Files
2025-10-25 03:02:53 +03:00

1.2 KiB
Raw Permalink Blame History

[expected.un.swap]

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 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 is true.

4

#

Effects: Equivalent to x.swap(y).