]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Implement LWG 1203 for rvalue iostreams
authorJonathan Wakely <jwakely@redhat.com>
Fri, 30 Apr 2021 13:07:28 +0000 (14:07 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 30 Apr 2021 13:33:19 +0000 (14:33 +0100)
commitaa475c4ac80733f85ba47b109fc1900f05e810e2
treed8a24aef9026d5d67e999a1884510e487567867e
parent0d501c338548152f9d2728d383eec3e9cef16784
libstdc++: Implement LWG 1203 for rvalue iostreams

This implements the resolution of LWG 1203 so that the constraints for
rvalue stream insertion/extraction are simpler, and the return type is
the original rvalue stream type not its base class.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/std/istream (operator>>(Istream&&, x&)): Simplify, as
per LWG 1203.
* include/std/ostream (operator<<(Ostream&&, const x&)):
Likewise.
* testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
Adjust dg-error pattern.
* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/4.cc: Define
is_extractable trait to replace std::__is_extractable. Make it
work with rvalue streams as well as lvalues, to replace f() and
g() helper functions.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
Define is_insertable trait to replace std::__is_insertable. Make
it work with rvalue streams as well as lvalues, to replace f()
and g() helper functions.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
Likewise.
* testsuite/27_io/filesystem/path/io/dr2989.cc: Prune additional
errors from new constraints.
* testsuite/27_io/rvalue_streams-2.cc: Remove PR 80675 checks,
which are no longer expected to compile.
* testsuite/27_io/rvalue_streams.cc: Adjust existing test.
Verify LWG 1203 changes.
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream
libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/6.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc
libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc
libstdc++-v3/testsuite/27_io/rvalue_streams.cc
This page took 0.067295 seconds and 6 git commands to generate.