C++ IOS Library - move


Advertisements

Description

Transfers all internal members of x to *this, except the associated stream buffer (rdbuf returns a null pointer after the call).

x is left in an unspecified but valid state, except that it is not tied (tie returns always a null pointer) and its associated stream buffer is unchanged (rdbuf returns the same as before the call).

Derived classes can call this function to implement move semantics.

Declaration

Following is the declaration for ios::move function.

void move (ios&  x);
void move (ios&& x);

Parameters

x − Stream object whose members are moved to *this.

Return Value

none

Exceptions

Basic guarantee − if an exception is thrown, both streams are in a valid state.

Data races

Modifies both stream objects (*this and x).

Concurrent access to any of these stream objects may cause data races.

ios.htm
Advertisements