Implement LWG2328. Rvalue stream extraction should perfect forward.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276545 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/istream b/include/istream
index ee69400..3a76ba8 100644
--- a/include/istream
+++ b/include/istream
@@ -1481,9 +1481,9 @@
template <class _CharT, class _Traits, class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>&
-operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
+operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp&& __x)
{
- __is >> __x;
+ __is >> _VSTD::forward<_Tp>(__x);
return __is;
}