Title
Move and swap for I/O streams
Status
nad
Section
[iostream.format]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 163 months ago

Messages

Date: 2010-11-29.10:49:30

[ 2010-11 Batavia ]

Closed as NAD.

The Library Working Group reviewed n3179 and concluded that this change alone was not sufficient, as it would require changes to some of the derived stream types in the library. The preference is to not make such a broad fix, and retain the current semantics. This is closed as NAD rather than NAD future as it will be difficult to rename the new functions introduced in the C++0x revision of the standard at a later date.

Date: 2010-10-24.00:00:00

[ 2010-10-24 Daniel adds: ]

Accepting n3179 would solve this issue.

Date: 2010-11-01.19:22:54

[ Resolution proposed by ballot comment: ]

In short: reverse the resolution of issue 900, then change the semantics to move and swap the rdbuf() pointer. Add a new protected constructor that takes an rvalue reference to a stream and a pointer to a streambuf, a new protected assign() operator that takes the same arguments, and a new protected partial_swap() function that doesn't swap rdbuf(). See Appendix 1 - Additional Details

Date: 2010-10-24.03:04:13

Addresses US-138

For istreams and ostreams, the move-constructor does not move-construct, the move-assignment operator does not move-assign, and the swap function does not swap because these operations do not manage the rdbuf() pointer. Useful applications of these operations are prevented both by their incorrect semantics and because they are protected.

History
Date User Action Args
2010-11-11 13:01:05adminsetstatus: open -> nad
2010-11-01 19:22:54adminsetmessages: + msg5232
2010-11-01 19:22:54adminsetmessages: + msg5231
2010-10-25 00:09:15adminsetmessages: + msg5097
2010-10-24 03:04:13adminsetmessages: + msg4939
2010-08-25 00:00:00admincreate