Namespaces
Variants

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

From cppreference.net

void swap ( flat_map & other ) noexcept ;
(seit 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);

Inhaltsverzeichnis

Parameter

other - Container-Adaptor, mit dem die Inhalte ausgetauscht werden sollen

Rückgabewert

(keine)

Exceptions

(keine)

Komplexität

Gleich wie zugrunde liegender Container (typischerweise konstant).

Beispiel

Siehe auch

spezialisiert den std::swap Algorithmus
(Funktionsschablone)