Full name of submitter (unless configured in github; will be published with the issue): Jiang An
Reference (section label): [basic.types.trivial]
Link to reflector thread (if any):
Issue description:
Recently accepted P2434R5 adds [basic.types.trivial] which states that:
for scalar types other than object pointer types, each such subset contains no more than one value.
This indicates that every valid value representation of a pointer to data member type corresponds to exactly one value.
However, such requirement can't be satisfies by mainstream implementations. E.g. given type union U { int x; int y; };, on Itanium ABI and MSVC ABI, &U::x and &U::y have the same (all-bit-zero) value representation, while &U::x and &U::y must be treated as different values.
Perhaps we should generalize the new mechanism for object pointer types (one-to-more correspondence between value representation and values, and value representation acquiring) to pointer to data member types.
Suggested resolution:
Full name of submitter (unless configured in github; will be published with the issue): Jiang An
Reference (section label): [basic.types.trivial]
Link to reflector thread (if any):
Issue description:
Recently accepted P2434R5 adds [basic.types.trivial] which states that:
This indicates that every valid value representation of a pointer to data member type corresponds to exactly one value.
However, such requirement can't be satisfies by mainstream implementations. E.g. given type
union U { int x; int y; };, on Itanium ABI and MSVC ABI,&U::xand&U::yhave the same (all-bit-zero) value representation, while&U::xand&U::ymust be treated as different values.Perhaps we should generalize the new mechanism for object pointer types (one-to-more correspondence between value representation and values, and value representation acquiring) to pointer to data member types.
Suggested resolution: