Created on 2023-10-10.00:00:00 last changed 7 months ago
Proposed resolution (approved by CWG 2023-10-20):
Change in 7.5.8.3 [expr.prim.req.type] paragraph 1 as follows:
A type-requirement asserts the validity of a type. The component names of a type-requirement are those of its nested-name-specifier (if any) and type-name. [Note 1: The enclosing requires-expression will evaluate to false if substitution of template arguments fails. —end note]
Change in 13.8.1 [temp.res.general] paragraph 4 as follows:
A qualified or unqualified name is said to be in a type-only context if it is the terminal name of
- a typename-specifier, type-requirement, nested-name-specifier, elaborated-type-specifier, class-or-decltype, or
- ...
[Accepted as a DR at the November, 2023 meeting.]
Consider:
template <typename T>
concept C = requires {
typename T::type<void>; // template required?
};
There is implementation divergence: gcc accepts, clang and MSVC reject.
A type-requirement ought to be a type-only context.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-04-05 21:43:46 | admin | set | status: dr -> drwp |
2023-12-19 10:15:28 | admin | set | status: ready -> dr |
2023-12-02 15:54:05 | admin | set | status: tentatively ready -> ready |
2023-10-20 21:07:14 | admin | set | messages: + msg7474 |
2023-10-20 21:07:14 | admin | set | status: open -> tentatively ready |
2023-10-10 00:00:00 | admin | create |