[libcxx-commits] [libcxx] 9334a85 - [libc++][NFC] Move basic_ios extern instantiations into <ios>
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 23 08:58:33 PDT 2023
Author: Nikolas Klauser
Date: 2023-05-23T08:58:26-07:00
New Revision: 9334a8580151f32680ac346fc9cd8b85e63c63d3
URL: https://github.com/llvm/llvm-project/commit/9334a8580151f32680ac346fc9cd8b85e63c63d3
DIFF: https://github.com/llvm/llvm-project/commit/9334a8580151f32680ac346fc9cd8b85e63c63d3.diff
LOG: [libc++][NFC] Move basic_ios extern instantiations into <ios>
`basic_ios` is defined in `<ios>`, so it seems weird that we declare the explicit instantiation for it i `<streambuf>`, which is technically unrelated.
Reviewed By: #libc, EricWF, ldionne
Spies: ldionne, EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D150912
Added:
Modified:
libcxx/include/ios
libcxx/include/streambuf
Removed:
################################################################################
diff --git a/libcxx/include/ios b/libcxx/include/ios
index f811343f0324d..5464ba58f8a43 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -848,6 +848,12 @@ basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* _
ios_base::set_rdbuf(__sb);
}
+extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
+#endif
+
_LIBCPP_HIDE_FROM_ABI inline
ios_base&
boolalpha(ios_base& __str)
diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf
index f491a14659096..095ac7d3ad837 100644
--- a/libcxx/include/streambuf
+++ b/libcxx/include/streambuf
@@ -490,11 +490,9 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type)
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
#endif
_LIBCPP_END_NAMESPACE_STD
More information about the libcxx-commits
mailing list