Title
Non-class potentially-overlapping objects
Status
nad
Section
9.12.11 [dcl.attr.nouniqueaddr]
Submitter
Jiang An

Created on 2022-01-29.00:00:00 last changed 17 months ago

Messages

Date: 2022-11-20.07:54:16

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.

Date: 2022-01-29.00:00:00

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.11 [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:16adminsetmessages: + msg7051
2022-11-20 07:54:16adminsetstatus: open -> nad
2022-01-29 00:00:00admincreate