Created on 2017-03-19.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4659.
Change [memory.syn], header <memory> synopsis, as indicated:
namespace std {
[…]
// [unique.ptr], class template unique_ptr
[…]
template <class T, class D>
bool operator>=(nullptr_t, const unique_ptr<T, D>& y);
template<class E, class T, class Y, class D>
basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, const unique_ptr<Y, D>& p);
[…]
}
Change [unique.ptr], class template unique_ptr synopsis, as indicated:
namespace std { […] template <class T, class D> bool operator>=(nullptr_t, const unique_ptr<T, D>& y); template<class E, class T, class Y, class D> basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, const unique_ptr<Y, D>& p); }
Add a new subclause following subclause [unique.ptr.special] as indicated:
23.11.1.?? unique_ptr I/O [unique.ptr.io]
template<class E, class T, class Y, class D> basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, const unique_ptr<Y, D>& p);-?- Effects: Equivalent to os << p.get();
-?- Returns: os. -?- Remarks: This function shall not participate in overload resolution unless os << p.get() is a valid expression.
[ 2017-07 Toronto Wed Issue Prioritization ]
Priority 0; move to Ready
shared_ptr does define operator<<, and unique_ptr should too, for consistency and usability reasons.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2017-11-13 19:01:36 | admin | set | status: voting -> wp |
2017-10-17 18:34:55 | admin | set | status: ready -> voting |
2017-07-15 22:58:07 | admin | set | messages: + msg9377 |
2017-07-15 22:58:07 | admin | set | status: new -> ready |
2017-04-22 14:21:01 | admin | set | messages: + msg9151 |
2017-03-19 00:00:00 | admin | create |