This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

1104. basic_ios::move should accept lvalues

Section: 31.5.4.3 [basic.ios.members] Status: C++11 Submitter: Howard Hinnant Opened: 2009-04-25 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [basic.ios.members].

View all issues with C++11 status.

Discussion:

With the rvalue reference changes in N2844 basic_ios::move no longer has the most convenient signature:

void move(basic_ios&& rhs);

This signature should be changed to accept lvalues. It does not need to be overloaded to accept rvalues. This is a special case that only derived clients will see. The generic move still needs to accept rvalues.

[ Batavia (2009-05): ]

Tom prefers, on general principles, to provide both overloads. Alisdair agrees.

Howard points out that there is no backward compatibility issue as this is new to C++0X.

We agree that both overloads should be provided, and Howard will provide the additional wording. Move to Open.

[ 2009-05-23 Howard adds: ]

Added overload, moved to Review.

[ 2009 Santa Cruz: ]

Move to Ready.

Proposed resolution:

Add a signature to the existing prototype in the synopsis of 31.5.4 [ios] and in 31.5.4.3 [basic.ios.members]:

void move(basic_ios& rhs);
void move(basic_ios&& rhs);