summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-25 09:57:06 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-25 09:57:06 +0000
commit45c6b4ca28c2341103e81da3c93a2f0c1f00bb83 (patch)
treed7759bc38009521bb22033d00f4537a6f506d17f /libstdc++-v3/include/std
parent20617a2b9e27b442cb973ccb37b9347bf495306c (diff)
downloadgcc-45c6b4ca28c2341103e81da3c93a2f0c1f00bb83.tar.gz
2015-03-25 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/65543 * include/std/istream (operator>>(basic_istream<>&&, _Tp&): Revert thinko in r150387. * include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&): Likewise. * testsuite/27_io/rvalue_streams-2.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r--libstdc++-v3/include/std/istream5
-rw-r--r--libstdc++-v3/include/std/ostream5
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
index 9deef435c76..74c0d81e0a3 100644
--- a/libstdc++-v3/include/std/istream
+++ b/libstdc++-v3/include/std/istream
@@ -922,7 +922,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
- { return (__is >> __x); }
+ {
+ __is >> __x;
+ return __is;
+ }
#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index decb29a5fa3..151c42bede2 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -626,7 +626,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Tp>
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
- { return (__os << __x); }
+ {
+ __os << __x;
+ return __os;
+ }
#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION