20
General utilities library
[utilities]
20.5
Tuples
[tuple]
20.5.3
Class template
tuple
[tuple.tuple]
20.5.3.3
swap
[tuple.swap]
🔗
constexpr
void
swap
(
tuple
&
rhs
)
noexcept
(
see below
)
;
1
#
Preconditions
: Each element in
*
this
is swappable with (
[swappable.
requirements]
) the corresponding element in
rhs
.
2
#
Effects
: Calls
swap
for each element in
*
this
and its corresponding element in
rhs
.
3
#
Throws
: Nothing unless one of the element-wise
swap
calls throws an exception
.
4
#
Remarks
: The expression inside
noexcept
is equivalent to the logical AND of the following expressions:
is_nothrow_swappable_v
<
T
i
>
where
T
i
is the
i
th
type in
Types
.