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: 18.104.22.168 [ostream.rvalue], 22.214.171.124 [istream.rvalue] Status: C++17 Submitter: Robert Haberlach Opened: 2015-09-08 Last modified: 2017-07-30
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 126.96.36.199 [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 188.8.131.52 [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