Implement LWG 2534, Constrain rvalue stream operators.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 30 Nov 2016 09:59:50 +0000 (11:59 +0200)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 30 Nov 2016 09:59:50 +0000 (11:59 +0200)
commita7da4881303a7bc9a59014f0d03cd946a9cdecec
treea174bba7556763a15e784ab3eaadd32609000ff2
parent40109581065366e04c547d2bff6e8f7ff5646fb8
Implement LWG 2534, Constrain rvalue stream operators.

* include/std/istream (__is_convertible_to_basic_istream): New.
(__is_extractable): Likewise.
(operator>>(basic_istream<_CharT, _Traits>&&, _Tp&&)):
Turn the stream parameter into a template parameter
and constrain.
* include/std/ostream (__is_convertible_to_basic_ostream): New.
(__is_insertable): Likewise.
(operator<<(basic_ostream<_CharT, _Traits>&&, const _Tp&)):
Turn the stream parameter into a template parameter
and constrain.
* testsuite/27_io/basic_istream/extractors_other/char/4.cc: New.
* 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.

From-SVN: r243006
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/6.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc [new file with mode: 0644]