libycxx

member function

std::expected::swap

Scope
std::expected
cppreference
std::expected nearest page

Synopsis

constexpr void swap(
    expected& rhs) noexcept(is_nothrow_move_constructible_v<T> && is_nothrow_swappable_v<T> && is_nothrow_move_constructible_v<E> && is_nothrow_swappable_v<E>)  requires is_swappable_v<T> && is_swappable_v<E> && is_move_constructible_v<T> && is_move_constructible_v<E> &&
             (is_nothrow_move_constructible_v<T> || is_nothrow_move_constructible_v<E>);