Created on 2022-11-09.00:00:00 last changed 12 months ago
Proposed resolution:
This wording is relative to N4917.
Modify [meta.type.synop], Table 46 ([tab:meta.unary.prop]) — "Type property predicates" — as indicated:
Table 48: Type property predicates [tab:meta.unary.prop] Template Condition Preconditions … template<class T, class U>
struct is_aggregate;T is an aggregate type ([dcl.init.aggr]) remove_all_extents_t<T>shall be an array type, a complete type, or cv void.
[ 2022-11-12 Approved at November 2022 meeting in Kona. Status changed: Immediate → WP. ]
[ Kona 2022-11-09; Move to Immediate ]
This is resolution of GB-090 ([meta.unary.prop] Unnecessary precondition for is_aggregate).
The precondition for is_aggregate is "remove_all_extents_t<T> shall be a complete type or cv void." This means that is_aggregate_v<Incomplete[2]> is undefined, but an array is always an aggregate, we don't need a complete element type to know that.
Historically the is_aggregate was introduced by LWG 2911 as part of the resolution of the NB comments. The comment proposed to introduce this trait with requirement "remove_all_extents_t<T> shall be a complete type, an array type, or (possibly cv-qualified) void.", that is close to resolution proposed in this issue. According to notes this was simplified during review, after realizing that remove_all_extents_t<T> is never an array type.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2022-11-17 00:42:33 | admin | set | messages: + msg13098 |
2022-11-17 00:42:33 | admin | set | status: immediate -> wp |
2022-11-10 01:10:50 | admin | set | messages: + msg12983 |
2022-11-10 01:10:50 | admin | set | status: new -> immediate |
2022-11-09 21:14:47 | admin | set | status: immediate -> new |
2022-11-09 04:16:51 | admin | set | messages: + msg12975 |
2022-11-09 00:00:00 | admin | create |