Skip to content

CWG2953 [basic.types.general] Does value representation exist for non-trivially-copyable types? #635

@t3nsor

Description

@t3nsor

Full name of submitter: Brian Bi

Issue description: [basic.types.general] first defines the value representation as

the set of bits in the object representation [...] that participate in representing a value

Later, in the same paragraph, it says

For trivially copyable types, the value representation is a set of bits in the object representation that determines a value, [...]

It is unclear what difference, if any, is meant between "participate in representing a value" and "determines a value". If they mean the same thing, then it is not clear why one of these statements applies only to trivially copyable types.

There does not appear to be any behavior in the standard that depends upon the value representation of a type that is not trivially copyable.

Suggested resolution: Edit [basic.types.general]/4:

[...] The value representation of a trivially copyable type T is the set of bits in the object representation of T that participate in representing a value value of type T , which is one discrete element of an implementation-defined set of values. [...] For trivially copyable types, the value representation is a set of bits in the object representation that determines a value, which is one discrete element of an implementation-defined set of values.

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