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); };

Swap contents with another expected.

constexpr
void
swap(
    expected& x,
    expected& y) noexcept(noexcept(x.swap(y)))
requires requires {x.swap(y);};

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

Parameters

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.

Created with MrDocs