Skip to content

Commit eb443dc

Browse files
committed
[libc++] Do not forward-declare syncstream outside experimental
We only define the classes in <syncstream> when experimental library features are enabled, but we would forward-declare them in <iosfwd> even when they are disabled. This led to confusing error messages about being unable to instantiate an undefined template.
1 parent deaf53e commit eb443dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/include/iosfwd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ typedef fpos<mbstate_t> u8streampos;
143143
typedef fpos<mbstate_t> u16streampos;
144144
typedef fpos<mbstate_t> u32streampos;
145145

146-
#if _LIBCPP_STD_VER >= 20
146+
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)
147147

148148
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT>>
149149
class basic_syncbuf;
@@ -161,7 +161,7 @@ using osyncstream = basic_osyncstream<char>;
161161
using wosyncstream = basic_osyncstream<wchar_t>;
162162
# endif
163163

164-
#endif // _LIBCPP_STD_VER >=20
164+
#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)
165165

166166
// Include other forward declarations here
167167
template <class _Tp, class _Alloc = allocator<_Tp> >

0 commit comments

Comments
 (0)