命名空间
变体
操作

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

来自 cppreference.cn
< cpp‎ | container‎ | flat map
 
 
 
 
void swap( flat_map& other ) noexcept;
(since C++23)
将容器适配器的内容与 other 的内容交换。 有效地调用
ranges::swap(compare, other.compare);
ranges::swap(c.keys, other.c.keys);
ranges::swap(c.values, other.c.values);

内容

[编辑] 参数

other - 要与其交换内容的容器适配器

[编辑] 返回值

(无)

[编辑] 异常

(无)

[编辑] 复杂度

与底层容器相同(通常为常数)。

[编辑] 示例

[编辑] 参见

特化 std::swap 算法
(函数模板) [编辑]