std::queue operator=
- since C++11
- until C++11
// (1) Non const version only
queue& operator=( const queue& other );
// (2) Non const version only
queue& operator=( queue&& other );
// (1) Non const version only
queue& operator=( const queue& other );
Replaces the contents of the container adaptor with those of other
.
- (1)
Copy assignment operator. Replaces the contents with a copy of the contents ofother
.noteEffectively calls
c = other.c
. - (2)
Move assignment operator. Replaces the contents with those of other using move semantics.noteEffectively calls
c = std::move(other.c)
.
Both operators are implicitly declared, which means that Container
has to be copyable/movable for them to be generated.
Parameters
other
- another container adaptor to use as data source
Return value
A reference to the container, *this
.
Exceptions
Equivalent to that of operator=
of the underlying container.
Complexity
Equivalent to that of operator=
of the underlying container.
Example
This section requires improvement. You can help by editing this doc page.