GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing cplusplus.com — std::unordered_map::swap Reference
<unordered_map>
unordered_map
public member function
<unordered_map>
std::unordered_map::swapvoid swap ( unordered_map& ump ); Swap content
After the call to this member function, the elements in this container are those which were in ump before the call, and the elements of ump are those which were in this. Other objects kept internally by the containers (such as their hasher or key_equal objects) are also swapped. This function exchanges internal pointers to data between the containers without actually performing any copies or moves on the individual elements, allowing for constant time execution no matter the sizes. Notice that a global algorithm function exists with this same name, swap. This global function is overloaded for arguments of type unordered_map to have the same behavior and complexity as this member function. Parameters
Return valuenoneExample
Possible output:
ComplexityConstant.Iterator validityAll iterators, pointers and references remain valid, but now are referring to elements in the other container, and iterate in it.See also
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | |||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |