Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This topic is in the Microsoft C++ documentation as a nonfunctional example of containers used in the C++ Standard Library. For more information, see C++ Standard Library Containers.
Swaps the controlled sequences between *this
and its argument.
Syntax
void swap(Container& right);
Remarks
If *this.get_allocator == right.get_allocator
, it does a swap in constant time. Otherwise, it performs element assignments and constructor calls proportional to the number of elements in the two controlled sequences.