[expected.un.swap] (original) (raw)

22 General utilities library [utilities]

22.8 Expected objects [expected]

22.8.3 Class template unexpected [expected.unexpected]

22.8.3.4 Swap [expected.un.swap]

πŸ”—

constexpr void swap(unexpected& other) noexcept(is_nothrow_swappable_v<E>);

1

#

Mandates: is_swappable_v<E> is true.

2

#

Effects: Equivalent to:using std​::​swap; swap(unex, other.unex);

πŸ”—

friend constexpr void swap(unexpected& x, unexpected& y) noexcept(noexcept(x.swap(y)));

3

#

Constraints: is_swappable_v<E> is true.

4

#

Effects: Equivalent to x.swap(y).