bsl::unordered_set<ManagedAttribute, AttributeHash>::swap

Exchange the value, hasher, key-equality functor, and max_load_factor of this object with those of the specified other object; also exchange the allocator of this object with that of other if the (template parameter) type ALLOCATOR has the propagate_on_container_swap trait, and do not modify either allocator otherwise. This method provides the no-throw exception-safety guarantee if and only if both the (template parameter) types HASH and EQUAL provide no-throw swap operations; if an exception is thrown, both objects are left in valid but unspecified states. This operation guarantees O[1] complexity. The behavior is undefined unless either this object was created with the same allocator as other or ALLOCATOR has the propagate_on_container_swap trait.

Synopsis

Declared in <bslstl_unorderedset.h>

void
swap(unordered_set<ManagedAttribute, AttributeHash>& other) noexcept(/* see-below */);

Exception specification

This function is potentially-throwing unless AllocatorTraits::is_always_equal::value && bsl::is_nothrow_swappable<HASH>::value && bsl::is_nothrow_swappable<EQUAL>::value.