Created on 2023-12-16.00:00:00 last changed 7 months ago
Proposed resolution:
This wording is relative to N4971.
Modify [expected.void.assign] as indicated:
constexpr expected& operator=(expected&& rhs) noexcept(see below);-?- Constraints: is_move_constructible_v<E> is true and is_move_assignable_v<E> is true.
[…] -6- Remarks: The exception specification is equivalent to is_nothrow_move_constructible_v<E> && is_nothrow_move_assignable_v<E>.-7- This operator is defined as deleted unless is_move_constructible_v<E> is true and is_move_assignable_v<E> is true.
[ Tokyo 2024-03-23; Status changed: Voting → WP. ]
[ 2024-03-11; Reflector poll ]
Set status to Tentatively Ready after six votes in favour during reflector poll.
It seems intended that copy functions of std::optional, std::variant, and std::expected are conditionally deleted, while move functions are constrained. However, the move assignment operator of std::expected<cv void, E> is currently conditionally deleted, which is inconsistent.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-04-02 10:29:12 | admin | set | messages: + msg14040 |
2024-04-02 10:29:12 | admin | set | status: voting -> wp |
2024-03-18 09:32:04 | admin | set | status: ready -> voting |
2024-03-11 21:55:38 | admin | set | messages: + msg13979 |
2024-03-11 21:55:38 | admin | set | status: new -> ready |
2023-12-22 10:28:38 | admin | set | messages: + msg13892 |
2023-12-16 00:00:00 | admin | create |