Created on 2015-09-08.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4527.
Modify [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 -?- Remarks: This function shall not participate in overload resolution unless the expression os << x is well-formed.
Modify [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 -?- Remarks: This function shall not participate in overload resolution unless the expression is >> x is well-formed.
[ 2016-08 - Chicago ]
Thurs AM: Moved to Tentatively Ready
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-05 03:33:05 | admin | set | messages: + msg8411 |
2016-08-05 03:33:05 | admin | set | status: new -> ready |
2015-09-09 20:13:59 | admin | set | messages: + msg7514 |
2015-09-08 00:00:00 | admin | create |