libstdc++: Fix the test for rvalue stream extraction
authorVille Voutilainen <ville.voutilainen@gmail.com>
Tue, 15 Dec 2020 10:05:51 +0000 (12:05 +0200)
committerVille Voutilainen <ville.voutilainen@gmail.com>
Tue, 15 Dec 2020 16:03:43 +0000 (18:03 +0200)
libstdc++-v3/ChangeLog:

* testsuite/27_io/rvalue_streams.cc: Run the extraction to a char*
for C++17 and lower only.

libstdc++-v3/testsuite/27_io/rvalue_streams.cc

index ad4d11c7cf32136cc4563da4f722335b599d3775..487aa4deedd73fea108277b4b0effd5a71773caf 100644 (file)
@@ -53,7 +53,9 @@ test02()
   VERIFY( x.as_rvalue == true );
 
   char arr[2];
+#if __cplusplus <= 201703L
   std::istringstream("x") >> &arr[0];
+#endif
   std::istringstream("x") >> arr;
 }