Skip to content

[basic.types.general] Object and value representation of a non-bit-field subobject seem underspecified #718

Open
@frederick-vs-ja

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.general]

Link to reflector thread (if any):

Issue description:

The resolution of CWG2519 made [basic.types.general] p4 cover non-bit-field complete objects and bit-field objects, but left non-bit-field subobject uncovered. Perhaps we should specify the object and value representations in a way consistent with complete objects.

Moreover, the latter occurrence of "complete" in the following sentence seems questionable because there're some complete types of which complete objects don't exist (i.e. abstract class types).

The object representation of a complete object type T is the sequence of N unsigned char objects taken up by a non-bit-field complete object of type T, where N equals sizeof(T).

Perhaps such oddity should also be addressed by CWG2817.

Suggested resolution:

Modify [basic.types.general] as indicated:

  1. [...] The object and value representation of a non-bit-field complete object of type T are the bytes and bits, respectively, of the object corresponding to the object and value representation of its type. [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions