public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix the test for rvalue stream extraction
@ 2020-12-15 10:13 Ville Voutilainen
  2020-12-15 10:44 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Ville Voutilainen @ 2020-12-15 10:13 UTC (permalink / raw)
  To: gcc-patches List, libstdc++

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

    libstdc++-v3/ChangeLog:

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

[-- Attachment #2: array-stream-extraction.diff --]
[-- Type: text/x-patch, Size: 447 bytes --]

diff --git a/libstdc++-v3/testsuite/27_io/rvalue_streams.cc b/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
index ad4d11c7cf3..487aa4deedd 100644
--- a/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
+++ b/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
@@ -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;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libstdc++: Fix the test for rvalue stream extraction
  2020-12-15 10:13 [PATCH] libstdc++: Fix the test for rvalue stream extraction Ville Voutilainen
@ 2020-12-15 10:44 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2020-12-15 10:44 UTC (permalink / raw)
  To: Ville Voutilainen; +Cc: gcc-patches List, libstdc++

On 15/12/20 12:13 +0200, Ville Voutilainen via Libstdc++ wrote:
>    libstdc++-v3/ChangeLog:
>
>            * testsuite/27_io/rvalue_streams.cc: Run the extraction to a char*
>            for C++17 and lower only.

OK, thanks.


>diff --git a/libstdc++-v3/testsuite/27_io/rvalue_streams.cc b/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
>index ad4d11c7cf3..487aa4deedd 100644
>--- a/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
>+++ b/libstdc++-v3/testsuite/27_io/rvalue_streams.cc
>@@ -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;
> }
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-15 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 10:13 [PATCH] libstdc++: Fix the test for rvalue stream extraction Ville Voutilainen
2020-12-15 10:44 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).