Spec-Zone.ru › C++

std::flat_map<Key,T,Compare,KeyContainer,MappedContainer>::swap

void swap( flat_map& other ) noexcept;
(since C++23)

Exchanges the contents of the container adaptor with those of 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

Complexity

Same as underlying container (typically constant).

Example

See also

std::swap(std::flat_map)
(C++23)
specializes the std::swap algorithm
(function template)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/container/flat_map/swap

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API