aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/iosfwd
diff options
context:
space:
mode:
authorRichard Smith <richard@metafoo.co.uk>2020-11-11 17:12:18 -0800
committerRichard Smith <richard@metafoo.co.uk>2020-12-09 12:22:35 -0800
commit2a2c228c7ada0a5d77c48b4d445ab0013ca0ae19 (patch)
treebb822e9b6f9bcabf708116dbcf0c6bafc40f6674 /libcxx/include/iosfwd
parent997a719d5a70100fcbbec1e51ce44cd66041bddc (diff)
downloadllvm-2a2c228c7ada0a5d77c48b4d445ab0013ca0ae19.zip
llvm-2a2c228c7ada0a5d77c48b4d445ab0013ca0ae19.tar.gz
llvm-2a2c228c7ada0a5d77c48b4d445ab0013ca0ae19.tar.bz2
Add new 'preferred_name' attribute.
This attribute permits a typedef to be associated with a class template specialization as a preferred way of naming that class template specialization. This permits us to specify that (for example) the preferred way to express 'std::basic_string<char>' is as 'std::string'. The attribute is applied to the various class templates in libc++ that have corresponding well-known typedef names. This is a re-commit. The previous commit was reverted because it exposed a pre-existing bug that has since been fixed / worked around; see PR48434. Differential Revision: https://reviews.llvm.org/D91311
Diffstat (limited to 'libcxx/include/iosfwd')
-rw-r--r--libcxx/include/iosfwd32
1 files changed, 32 insertions, 0 deletions
diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index 070fbe8..0a0de99 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -185,6 +185,36 @@ typedef basic_ifstream<wchar_t> wifstream;
typedef basic_ofstream<wchar_t> wofstream;
typedef basic_fstream<wchar_t> wfstream;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_PREFERRED_NAME(wios) basic_ios;
+
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_PREFERRED_NAME(wstreambuf) basic_streambuf;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_PREFERRED_NAME(wistream) basic_istream;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_PREFERRED_NAME(wostream) basic_ostream;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_PREFERRED_NAME(wiostream) basic_iostream;
+
+template <class _CharT, class _Traits, class _Allocator>
+ class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_PREFERRED_NAME(wstringbuf) basic_stringbuf;
+template <class _CharT, class _Traits, class _Allocator>
+ class _LIBCPP_PREFERRED_NAME(istringstream) _LIBCPP_PREFERRED_NAME(wistringstream) basic_istringstream;
+template <class _CharT, class _Traits, class _Allocator>
+ class _LIBCPP_PREFERRED_NAME(ostringstream) _LIBCPP_PREFERRED_NAME(wostringstream) basic_ostringstream;
+template <class _CharT, class _Traits, class _Allocator>
+ class _LIBCPP_PREFERRED_NAME(stringstream) _LIBCPP_PREFERRED_NAME(wstringstream) basic_stringstream;
+
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_PREFERRED_NAME(wfilebuf) basic_filebuf;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_PREFERRED_NAME(wifstream) basic_ifstream;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_PREFERRED_NAME(wofstream) basic_ofstream;
+template <class _CharT, class _Traits>
+ class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_PREFERRED_NAME(wfstream) basic_fstream;
+
template <class _State> class _LIBCPP_TEMPLATE_VIS fpos;
typedef fpos<mbstate_t> streampos;
typedef fpos<mbstate_t> wstreampos;
@@ -210,6 +240,8 @@ template <class _CharT, // for <stdexcept>
typedef basic_string<char, char_traits<char>, allocator<char> > string;
typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
+template <class _CharT, class _Traits, class _Allocator>
+ class _LIBCPP_PREFERRED_NAME(string) _LIBCPP_PREFERRED_NAME(wstring) basic_string;
// Include other forward declarations here
template <class _Tp, class _Alloc = allocator<_Tp> >