Created on 2020-07-03.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4861.
Modify [concept.convertible] as indicated:
-1- Given types From and To and an expression E
such that decltype((E)) is add_rvalue_reference_t<From>whose type and value category are the same as those of declval<From>(), convertible_to<From, To> requires E to be both implicitly and explicitly convertible to type To. The implicit and explicit conversions are required to produce equal results.
[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]
[ 2020-07-12; Reflector prioritization ]
Set priority to 0 and status to Tentatively Ready after five votes in favour during reflector discussions.
There are no expressions of type cv-qualified void because any such expression must be prvalues and [expr.type]/2 states:
If a prvalue initially has the type "cv T", where T is a cv-unqualified non-class, non-array type, the type of the expression is adjusted to T prior to any further analysis.
However, [concept.convertible] p1 states:
Given types From and To and an expression E such that decltype((E)) is add_rvalue_reference_t<From>, convertible_to<From, To> requires E to be both implicitly and explicitly convertible to type To.
When From is cv-qualified void, E does not exist, yet we do want convertible_to<const void, void> to be modeled.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2020-11-09 21:40:50 | admin | set | messages: + msg11582 |
2020-11-09 21:40:50 | admin | set | status: ready -> wp |
2020-07-12 17:33:57 | admin | set | messages: + msg11369 |
2020-07-12 17:33:57 | admin | set | status: new -> ready |
2020-07-05 16:20:24 | admin | set | messages: + msg11359 |
2020-07-03 00:00:00 | admin | create |