Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
t3nsor opened this issue Nov 8, 2024 · 1 comment

Comments

@t3nsor
Copy link

t3nsor commented Nov 8, 2024

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.

@jensmaurer
Copy link
Member

CWG2953

@jensmaurer jensmaurer changed the title [basic.types.general] Does value representation exist for non-trivially-copyable types? CWG2953 [basic.types.general] Does value representation exist for non-trivially-copyable types? Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants