cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

GB-094 22.8.6.5p5 [expected.object.swap] Constrain the hidden friend `swap` of `std::expected` #445

Closed wg21bot closed 1 year ago

wg21bot commented 1 year ago

friend constexpr void swap(expected& x, expected& y) noexcept(noexcept(x.swap(y)));

Note that the member swap is constrained

Constraints: x.swap(y) is well formed

JeffGarland commented 1 year ago

LWG identified that this is already constrained by "Effects: Equivalent to" https://eel.is/c++draft/expected#un.swap-2

poll: NAD 7-0-0 in Kona Tue.

jensmaurer commented 1 year ago

Rejected. There is no consensus for a change.