23 General utilities library [utilities]

23.5 Tuples [tuple]

23.5.3 Class template tuple [tuple.tuple] swap [tuple.swap]

void swap(tuple& rhs) noexcept(see below);

Requires: Each element in *this shall be swappable with ([swappable.requirements]) the corresponding element in rhs.

Effects: Calls swap for each element in *this and its corresponding element in rhs.

Remarks: The expression inside noexcept is equivalent to the logical and of the following expressions:


where is the type in Types.

Throws: Nothing unless one of the element-wise swap calls throws an exception.