Skip to content

[libc++] Do not forward-declare syncstream outside experimental #82511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcxx/include/iosfwd
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ typedef fpos<mbstate_t> u8streampos;
typedef fpos<mbstate_t> u16streampos;
typedef fpos<mbstate_t> u32streampos;

#if _LIBCPP_STD_VER >= 20
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)

template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
class basic_syncbuf;
Expand All @@ -161,7 +161,7 @@ using osyncstream = basic_osyncstream<char>;
using wosyncstream = basic_osyncstream<wchar_t>;
# endif

#endif // _LIBCPP_STD_VER >=20
#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)

// Include other forward declarations here
template <class _Tp, class _Alloc = allocator<_Tp> >
Expand Down
8 changes: 6 additions & 2 deletions libcxx/modules/std/iosfwd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,23 @@ export namespace std {
using std::u8streampos;
#endif

#ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM
using std::basic_osyncstream;
using std::basic_syncbuf;
#endif

using std::istreambuf_iterator;
using std::ostreambuf_iterator;

#ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM
using std::osyncstream;
using std::syncbuf;

#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wosyncstream;
using std::wsyncbuf;
#endif
# endif
#endif // _LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM

using std::fpos;
} // namespace std