std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>:: swap
From cppreference.com
C++
Containers library
Sequence | ||||
(C++11)
|
||||
(C++26)
|
||||
(C++11)
|
||||
Associative | ||||
Unordered associative | ||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
(C++11)
|
||||
Adaptors | ||||
(C++23)
|
||||
(C++23)
|
||||
(C++23)
|
||||
(C++23)
|
||||
Views | ||||
(C++20)
|
||||
(C++23)
|
||||
Tables | ||||
Iterator invalidation | ||||
Member function table | ||||
Non-member function table |
std::flat_map
void
swap
(
flat_map
&
other
)
noexcept
;
|
(since C++23) | |
other
. Effectively calls
ranges::swap(compare, other.compare); ranges::swap(c.keys, other.c.keys); ranges::swap(c.values, other.c.values);
Parameters
other | - | container adaptor to exchange the contents with |
Return value
(none)
Exceptions
(none)
Complexity
Same as underlying container (typically constant).
Example
This section is incomplete
Reason: no example |
See also
(C++23)
|
specializes the
std::swap
algorithm
(function template) |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/container/flat_map/swap&oldid=167631
"