PR libstdc++/80675, PR libstdc++/80940
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 21 Jun 2017 19:53:26 +0000 (22:53 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 21 Jun 2017 19:53:26 +0000 (22:53 +0300)
commit5e88d2d08d464d80bbe5dfd64db954f2dd516b7e
tree682442a25a4dfb8a09356142015098db8fe62801
parentcb8d1b01b3a2198c67d04a3a077bc7c55aaaa31c
PR libstdc++/80675, PR libstdc++/80940

* include/std/istream:
(__is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*)): New.
(__do_is_convertible_to_basic_istream_impl): Likewise.
(__is_convertible_to_basic_istream_impl): Likewise.
(__is_convertible_to_basic_istream): Use the new base.
(__rvalue_istream_type): New.
(operator>>(_Istream&&, _Tp&&)): Use the new helper alias
for the SFINAE check, convert to the helper alias type before
doing the actual extraction.
* include/std/ostream:
(__is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*)): New.
(__do_is_convertible_to_basic_ostream_impl): Likewise.
(__is_convertible_to_basic_ostream_impl): Likewise.
(__is_convertible_to_basic_ostream): Use the new base.
(__rvalue_ostream_type): New.
(operator<<(_Ostream&&, const _Tp&)): Use the new helper alias
for the SFINAE check, convert to the helper alias type before
doing the actual insertion.
* testsuite/27_io/rvalue_streams-2.cc: Add new tests.

From-SVN: r249468
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream
libstdc++-v3/testsuite/27_io/rvalue_streams-2.cc