mrdocs::polyfill::swap

swap overloads

Synopses

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

Parameters

NameDescription
aThe first object to swap.
bThe second object to swap.
xThe first object to swap.
yThe second object to swap.