Skip to content

Commit 7b6c355

Browse files
committed
[LIBCXX] std::ostream::sentry should be exported
for testing by CI. std::istream::sentry is left original to ensure test detects this defect.
1 parent 827e89b commit 7b6c355

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libcxx/include/__ostream/basic_ostream.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,12 @@ basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const ch
665665

666666
# endif // _LIBCPP_STD_VER >= 20
667667

668+
extern template _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>::sentry::sentry(basic_ostream<char>& __os);
669+
extern template _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>::sentry::~sentry();
668670
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
669671
# if _LIBCPP_HAS_WIDE_CHARACTERS
672+
extern template _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>::sentry::sentry(basic_ostream<wchar_t>& __os);
673+
extern template _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>::sentry::~sentry();
670674
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
671675
# endif
672676

libcxx/src/ios.instantiations.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2020
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>;
2121
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>;
2222
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>;
23+
template _LIBCPP_EXPORTED_FROM_ABI basic_ostream<char>::sentry::sentry(basic_ostream<char>& __os);
24+
template _LIBCPP_EXPORTED_FROM_ABI basic_ostream<char>::sentry::~sentry();
2325
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>;
2426
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>;
2527

2628
#if _LIBCPP_HAS_WIDE_CHARACTERS
2729
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>;
2830
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>;
2931
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>;
32+
template _LIBCPP_EXPORTED_FROM_ABI basic_ostream<wchar_t>::sentry::sentry(basic_ostream<wchar_t>& __os);
33+
template _LIBCPP_EXPORTED_FROM_ABI basic_ostream<wchar_t>::sentry::~sentry();
3034
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>;
3135
#endif
3236

0 commit comments

Comments
 (0)