diff options
author | Mark de Wever <koraq@xs4all.nl> | 2023-05-06 11:45:13 +0200 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2023-05-07 12:28:52 +0200 |
commit | 9a317802efe9a6d8f86ba098c7fa8d182c2c0285 (patch) | |
tree | 967f6ad47e3466aef8ea4b8aedbf2257799a6814 /libcxx/include | |
parent | 728b8a139804db4fd9bce1ac7fa3dcbaf4dc316c (diff) | |
download | llvm-9a317802efe9a6d8f86ba098c7fa8d182c2c0285.tar.gz |
[libc++] Modernizes the forwarded ios headers.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D150030
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/__fwd/fstream.h | 16 | ||||
-rw-r--r-- | libcxx/include/__fwd/ios.h | 8 | ||||
-rw-r--r-- | libcxx/include/__fwd/istream.h | 8 | ||||
-rw-r--r-- | libcxx/include/__fwd/ostream.h | 4 | ||||
-rw-r--r-- | libcxx/include/__fwd/sstream.h | 16 | ||||
-rw-r--r-- | libcxx/include/__fwd/streambuf.h | 4 |
6 files changed, 28 insertions, 28 deletions
diff --git a/libcxx/include/__fwd/fstream.h b/libcxx/include/__fwd/fstream.h index 0eed60a42c2b..b4a112bfd4de 100644 --- a/libcxx/include/__fwd/fstream.h +++ b/libcxx/include/__fwd/fstream.h @@ -27,16 +27,16 @@ class _LIBCPP_TEMPLATE_VIS basic_ofstream; template <class _CharT, class _Traits = char_traits<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_fstream; -typedef basic_filebuf<char> filebuf; -typedef basic_ifstream<char> ifstream; -typedef basic_ofstream<char> ofstream; -typedef basic_fstream<char> fstream; +using filebuf = basic_filebuf<char>; +using ifstream = basic_ifstream<char>; +using ofstream = basic_ofstream<char>; +using fstream = basic_fstream<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_filebuf<wchar_t> wfilebuf; -typedef basic_ifstream<wchar_t> wifstream; -typedef basic_ofstream<wchar_t> wofstream; -typedef basic_fstream<wchar_t> wfstream; +using wfilebuf = basic_filebuf<wchar_t>; +using wifstream = basic_ifstream<wchar_t>; +using wofstream = basic_ofstream<wchar_t>; +using wfstream = basic_fstream<wchar_t>; #endif template <class _CharT, class _Traits> diff --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h index e2512471e972..82c865d58cc7 100644 --- a/libcxx/include/__fwd/ios.h +++ b/libcxx/include/__fwd/ios.h @@ -21,9 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _CharT, class _Traits = char_traits<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_ios; -typedef basic_ios<char> ios; +using ios = basic_ios<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_ios<wchar_t> wios; +using wios = basic_ios<wchar_t>; #endif template <class _CharT, class _Traits> @@ -31,9 +31,9 @@ class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_N #if defined(_NEWLIB_VERSION) // On newlib, off_t is 'long int' -typedef long int streamoff; // for char_traits in <string> +using streamoff = long int; // for char_traits in <string> #else -typedef long long streamoff; // for char_traits in <string> +using streamoff = long long; // for char_traits in <string> #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__fwd/istream.h b/libcxx/include/__fwd/istream.h index 5172da095ece..a06907a6c8ef 100644 --- a/libcxx/include/__fwd/istream.h +++ b/libcxx/include/__fwd/istream.h @@ -24,12 +24,12 @@ class _LIBCPP_TEMPLATE_VIS basic_istream; template <class _CharT, class _Traits = char_traits<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_iostream; -typedef basic_istream<char> istream; -typedef basic_iostream<char> iostream; +using istream = basic_istream<char>; +using iostream = basic_iostream<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_istream<wchar_t> wistream; -typedef basic_iostream<wchar_t> wiostream; +using wistream = basic_istream<wchar_t>; +using wiostream = basic_iostream<wchar_t>; #endif template <class _CharT, class _Traits> diff --git a/libcxx/include/__fwd/ostream.h b/libcxx/include/__fwd/ostream.h index 5a6a01f3b834..3347e0f71d7a 100644 --- a/libcxx/include/__fwd/ostream.h +++ b/libcxx/include/__fwd/ostream.h @@ -21,10 +21,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _CharT, class _Traits = char_traits<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_ostream; -typedef basic_ostream<char> ostream; +using ostream = basic_ostream<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_ostream<wchar_t> wostream; +using wostream = basic_ostream<wchar_t>; #endif template <class _CharT, class _Traits> diff --git a/libcxx/include/__fwd/sstream.h b/libcxx/include/__fwd/sstream.h index 83e82bf8a272..e2d46fbe1d9b 100644 --- a/libcxx/include/__fwd/sstream.h +++ b/libcxx/include/__fwd/sstream.h @@ -28,16 +28,16 @@ class _LIBCPP_TEMPLATE_VIS basic_ostringstream; template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_stringstream; -typedef basic_stringbuf<char> stringbuf; -typedef basic_istringstream<char> istringstream; -typedef basic_ostringstream<char> ostringstream; -typedef basic_stringstream<char> stringstream; +using stringbuf = basic_stringbuf<char>; +using istringstream = basic_istringstream<char>; +using ostringstream = basic_ostringstream<char>; +using stringstream = basic_stringstream<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_stringbuf<wchar_t> wstringbuf; -typedef basic_istringstream<wchar_t> wistringstream; -typedef basic_ostringstream<wchar_t> wostringstream; -typedef basic_stringstream<wchar_t> wstringstream; +using wstringbuf = basic_stringbuf<wchar_t>; +using wistringstream = basic_istringstream<wchar_t>; +using wostringstream = basic_ostringstream<wchar_t>; +using wstringstream = basic_stringstream<wchar_t>; #endif template <class _CharT, class _Traits, class _Allocator> diff --git a/libcxx/include/__fwd/streambuf.h b/libcxx/include/__fwd/streambuf.h index f1ee9115ed24..b35afa6afe34 100644 --- a/libcxx/include/__fwd/streambuf.h +++ b/libcxx/include/__fwd/streambuf.h @@ -21,10 +21,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _CharT, class _Traits = char_traits<_CharT> > class _LIBCPP_TEMPLATE_VIS basic_streambuf; -typedef basic_streambuf<char> streambuf; +using streambuf = basic_streambuf<char>; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -typedef basic_streambuf<wchar_t> wstreambuf; +using wstreambuf = basic_streambuf<wchar_t>; #endif template <class _CharT, class _Traits> |