Created on 2022-01-29.00:00:00 last changed 24 months ago
CWG 2022-11-11
Restricting the type of a potentially-overlapping subobject would make it difficult to use no_unique_address on a subobject of dependent type, which may be a non-class type in some, but not all, specializations. Compilers can warn about non-sensical uses in non-dependent contexts.
The definition of a “potentially-overlapping subobject” in 6.7.2 [intro.object] paragraph 7 does not exclude non-class subobjects; in particular, 9.12.12 [dcl.attr.nouniqueaddr] makes no restrictions on the types of members declared with the no_unique_address attribute. It is not clear that a potentially-overlapping scalar member or array of scalar elements is useful. Should there be a restriction on the type of potentially-overlapping subjects?
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-20 07:54:16 | admin | set | messages: + msg7051 |
2022-11-20 07:54:16 | admin | set | status: open -> nad |
2022-01-29 00:00:00 | admin | create |