swap overloads
Declared in <mrdocs/polyfill/expected.hpp>
Swap the contents of two expected objects.
constexpr
void
swap(
expected& a,
expected& b) noexcept(noexcept(a.swap(b)))
requires requires { a.swap(b); };
» more...
Swap contents with another expected.
constexpr
void
swap(
expected& x,
expected& y) noexcept(noexcept(x.swap(y)))
requires requires {x.swap(y);};
» more...
Swap the stored errors of two unexpected objects.
constexpr
void
swap(
unexpected& x,
unexpected& y) noexcept(noexcept(x.swap(y)))
requires std::is_swappable_v<E>;
» more...
| Name | Description |
|---|---|
| a | The first object to swap. |
| b | The second object to swap. |
| x | The first object to swap. |
| y | The second object to swap. |