Created on 2019-06-25.00:00:00 last changed 50 months ago
Rationale:
P1957R2.[ 2020-11-09 Resolved for C++20. Status changed: Tentatively Resolved → Resolved. ]
[ 2020-05-28; LEWG issue reviewing ]
P1957R2 was accepted in Prague as CWG motion 5 and resolves LWG 3228.
[ This is US212; status set to "LEWG" for guidance on desired behavior. ]
[ 2019-07 Issue Prioritization ]
Priority to 2 after discussion on the reflector.
User mcencora on reddit today posted this example:
#include <variant> struct ConvertibleToBool { constexpr operator bool() const { return true; } }; static_assert(std::holds_alternative<bool>(std::variant<int, bool>(ConvertibleToBool{})));
Before P0608, the variant holds bool. After P0608, the variant holds int so the static assertion fires.
I don't know what the right answer is between (a) ill-formed (b) hold bool and (c) hold int is, but I think (a) and (b) are better options than (c).History | |||
---|---|---|---|
Date | User | Action | Args |
2020-11-09 22:09:58 | admin | set | messages: + msg11602 |
2020-05-31 09:54:47 | admin | set | messages: + msg11318 |
2020-05-31 09:54:47 | admin | set | messages: + msg11317 |
2020-05-31 09:54:47 | admin | set | status: lewg -> resolved |
2019-11-04 18:05:33 | admin | set | messages: + msg10731 |
2019-11-04 18:05:33 | admin | set | status: new -> lewg |
2019-07-23 15:26:26 | admin | set | messages: + msg10509 |
2019-06-25 00:00:00 | admin | create |