19
General utilities library
[utilities]
19.7
Variants
[variant]
19.7.10
Specialized algorithms
[variant.specalg]
🔗
template
<
class
.
.
.
Types
>
void
swap
(
variant
<
Types
.
.
.
>
&
v, variant
<
Types
.
.
.
>
&
w
)
noexcept
(
see below
)
;
1
#
Effects:
Equivalent to
v
.
swap
(
w
)
.
2
#
Remarks:
This function shall not participate in overload resolution unless
is_move_constructible_v
<
T
i
>
&
&
is_swappable_v
<
T
i
>
is
true
for all
i
.
The expression inside
noexcept
is equivalent to
noexcept
(
v
.
swap
(
w
)
)
.