23 General utilities library [utilities]

23.7 Variants [variant]

23.7.10 Specialized algorithms [variant.specalg]

template<class... Types> void swap(variant<Types...>& v, variant<Types...>& w) noexcept(see below);
Effects: Equivalent to v.swap(w).
Remarks: This function shall not participate in overload resolution unless is_­move_­constructible_­v<T> && is_­swappable_­v<T> is true for all i.
The expression inside noexcept is equivalent to noexcept(v.swap(w)).