22 General utilities library [utilities]

22.8 Expected objects [expected]

22.8.7 Partial specialization of expected for void types [expected.void]

22.8.7.5 Swap [expected.void.swap]

Table 64: swap(expected&) effects [tab:expected.void.swap]
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);