Created on 2009-05-28.00:00:00 last changed 172 months ago
Rationale:
Several objections to move forward with this issue were voiced in the thread starting with c++std-lib-25438. Among them is that we know of no motivating use case to make streaming rvalues behave differently than streaming const lvalues.
Proposed resolution:
Add second operator= overload to class template ostream_iterator in [ostream.iterator], para 2:
ostream_iterator<T,charT,traits>& operator=(const T& value); ostream_iterator<T,charT,traits>& operator=(T&& value);
Add a new paragraph: in [ostream.iterator.ops]:
ostream_iterator& operator=(T&& value);-2- Effects:
*out_stream << std::move(value); if(delim != 0) *out_stream << delim; return (*this);
[ 2009-11-10 Howard adds: ]
Moved to Tentatively NAD after 5 positive votes on c++std-lib. Rationale added below.
ostream_iterator has not been updated to support moveable types, in a similar manner to the insert iterators. Note that this is not a problem for ostreambuf_iterator, as the types it is restricted to dealing with do not support extra-efficient moving.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg835 |
2010-10-21 18:28:33 | admin | set | messages: + msg834 |
2010-10-21 18:28:33 | admin | set | messages: + msg833 |
2009-05-28 00:00:00 | admin | create |