libstdc++: Only test writing to wostream if supported [PR 98725]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 18 Jan 2021 14:23:13 +0000 (14:23 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 18 Jan 2021 14:23:13 +0000 (14:23 +0000)
libstdc++-v3/ChangeLog:

PR libstdc++/98725
* testsuite/20_util/unique_ptr/io/lwg2948.cc:  Do not try to
write to a wide character stream if wide character support is
disabled in the library.

libstdc++-v3/testsuite/20_util/unique_ptr/io/lwg2948.cc

index ab0b17d2b1c14e630829d1f8743d7a6923013956..131bfb24ed7d5d137a8eba5d814002cfc7da025e 100644 (file)
@@ -73,8 +73,10 @@ template<typename D>
 
 static_assert( streamable<std::ostream, Unique_ptr<deleter<char>>> );
 static_assert( ! streamable<std::ostream, Unique_ptr<deleter<wchar_t>>> );
+#ifdef _GLIBCXX_USE_WCHAR_T
 static_assert( ! streamable<std::wostream, Unique_ptr<deleter<char>>> );
 static_assert( streamable<std::wostream, Unique_ptr<deleter<wchar_t>>> );
+#endif
 
 void
 test02()