Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

std::flat_set<Key,Compare,KeyContainer>::swap

Same as underlying container (typically constant).

NotebookLM
void swap( flat_set& other ) noexcept;
(since C++23)
Exchanges the contents of the container adaptor with those of other. Effectively calls
snippet.cpp
ranges::swap(compare, other.compare);
ranges::swap(c, other.c);

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

specializes the std::swap algorithm
(function template)

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.