Container Class::swap
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.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for