This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 22.214.171.124 [ostream.rvalue], 126.96.36.199 [istream.rvalue] Status: C++17 Submitter: Robert Haberlach Opened: 2015-09-08 Last modified: 2019-01-01
View all other issues in [ostream.rvalue].
View all issues with C++17 status.
The rvalue stream insertion and extraction operators should be constrained to not participate in overload resolution unless the expression they evaluate is well-formed. Programming code that tests the validity of stream insertions (or extractions) using SFINAE can result in false positives, as the present declarations accept virtually any right-hand side argument. Moreover, there is no need for pollution of the candidate set with ill-formed specializations.
[2016-08 - Chicago]
Thurs AM: Moved to Tentatively Ready
This wording is relative to N4527.
Modify 188.8.131.52 [ostream.rvalue] as indicated:
template <class charT, class traits, class T> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const T& x);
-1- Effects: os << x-2- Returns: os
Modify 184.108.40.206 [istream.rvalue] as indicated:
template <class charT, class traits, class T> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&& is, T& x);
-1- Effects: is >> x-2- Returns: is