Created on 2022-03-23.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4910.
Modify [expected.void.assign] as indicated:
constexpr expected& operator=(expected&& rhs) noexcept(see below);-4- Effects:
(4.1) — If this->has_value() && rhs.has_value() is true, no effects.
(4.2) — Otherwise, if this->has_value() is true, equivalent to:
construct_at(addressof(unex), std::move(rhs.unex)); has_val = false;(4.3) — Otherwise, if rhs.has_value() is true, destroys unex and sets has_val to true.
(4.4) — Otherwise, equivalent to unex = std::move(rhs.error()).
[ 2022-07-25 Approved at July 2022 virtual plenary. Status changed: Ready → WP. ]
[ 2022-07-15; LWG telecon: move to Ready ]
[ 2022-05-17; Reflector poll ]
Set status to Tentatively Ready after eight votes in favour during reflector poll.
For expected<cv void>::operator=(expected&&) we have this in the last bullet of the Effects element:
Otherwise, equivalent to unex = rhs.error().
That should be a move assignment, not a copy assignment.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-07-25 20:32:58 | admin | set | messages: + msg12641 |
2022-07-25 20:32:58 | admin | set | status: ready -> wp |
2022-07-25 20:28:19 | admin | set | messages: + msg12615 |
2022-05-17 11:57:24 | admin | set | messages: + msg12453 |
2022-05-17 11:57:24 | admin | set | status: new -> ready |
2022-03-26 13:33:21 | admin | set | messages: + msg12415 |
2022-03-23 00:00:00 | admin | create |