Skip to content

[basic.types.trivial] Pointer to data member types are overlooked #941

Description

@frederick-vs-ja

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions