|
set::swappublic member function
void swap ( set<Key,Compare,Allocator>& st ); Swap content Exchanges the content of the container with the content of st, which is another set object containing elements of the same type. Sizes may differ.After the call to this member function, the elements in this container are those which were in st before the call, and the elements of st are those which were in this. All iterators, references and pointers remain valid for the swapped objects. Notice that a global algorithm function exists with this same name, swap, and the same behavior. Parameters
Return valuenoneExample
Output:
ComplexityConstant.See also
|