constexpr void swap(expected& rhs) noexcept(see below);
this->has_value() | !this->has_value() | ||
rhs.has_value() | no effects | calls rhs.swap(*this) | |
!rhs.has_value() | see below | equivalent to: using std::swap; swap(unex, rhs.unex); |
friend constexpr void swap(expected& x, expected& y) noexcept(noexcept(x.swap(y)));