aligned_union
should require complete object typesSection: 21.3.8.7 [meta.trans.other] Status: C++20 Submitter: Tim Song Opened: 2017-06-14 Last modified: 2021-02-25
Priority: 0
View all other issues in [meta.trans.other].
View all issues with C++20 status.
Discussion:
aligned_union
's description doesn't, but should, require the types provided to be complete object types.
[2017-07 Toronto Monday issue prioritization]
Priority 0; move to Ready
Proposed resolution:
This wording is relative to N4659.
In 21.3.8.7 [meta.trans.other], edit Table 50 "Other transformations" as indicated:
Table 50 — Other transformations Template Comments […]
template <size_t Len, class... Types>
struct aligned_union;The member typedef type
shall be a POD type suitable for use as uninitialized storage for any object whose type is listed inTypes
; its size shall be at leastLen
. The static memberalignment_value
shall be an integral constant of typesize_t
whose value is the strictest alignment of all types listed inTypes
.
Requires: At least one type is provided. Each type in the parameter packTypes
shall be a complete object type.[…]