aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/basic_istream
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-05-06 19:14:42 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-05-07 23:45:52 +0100
commita87ceadf17b4a899f3e74e2da8b6b209461d2742 (patch)
treef8f0207607a553c7387377730fff224eeda5561c /libstdc++-v3/testsuite/27_io/basic_istream
parent7c4c9fcc0de865876fb25fe75f4ed6e143bd48c0 (diff)
downloadgcc-a87ceadf17b4a899f3e74e2da8b6b209461d2742.zip
gcc-a87ceadf17b4a899f3e74e2da8b6b209461d2742.tar.gz
gcc-a87ceadf17b4a899f3e74e2da8b6b209461d2742.tar.bz2
libstdc++: Fix constraints for rvalue stream insertion/extraction
The __rval_streamable() function was an attempt to test for convertibility cheaply and without confusing diagnostics. It doesn't work with Clang though, and is probably ill-formed. Replace that helper function with a check for derivation from ios_base, and use that in the alias templates __rvalue_stream_insertion_t and __rvalue_stream_extraction_t. Use concepts for the constraints when available. libstdc++-v3/ChangeLog: * include/std/istream (__rvalue_stream_extraction_t): Replace use of __rval_streamable. * include/std/ostream (__rvalue_stream_insertion_t): Likewise. (__rval_streamable): Remove. (_Require_derived_from_ios_base, __derived_from_ios_base): New helper for checking constraints. * testsuite/27_io/basic_istream/extractors_other/char/4.cc: Fix reference to the wrong subclause of the standard. * testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/6.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/99692.cc: New test. * testsuite/27_io/filesystem/path/io/dr2989.cc: Adjust pruned errors.
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/basic_istream')
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc
index 9f1e293..94e41a1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc
@@ -17,7 +17,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 27.6.2.5.3 basic_ostream manipulator inserters
+// C++11 27.7.2.6 Rvalue stream extraction [istream.rvalue]
#include <sstream>
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc
index fc7f550..b182be7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc
@@ -17,7 +17,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 27.6.2.5.3 basic_ostream manipulator inserters
+// C++11 27.7.2.6 Rvalue stream extraction [istream.rvalue]
#include <sstream>