Created on 2024-11-08.00:00:00 last changed 1 week ago
Suggested resolution:
Change in 6.8.1 [basic.types.general] paragraph 4 as follows:
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). The value representation of a trivially copyable type T is the set of bits in the object representation of T that participate in representing avaluevalue of type T, which is one discrete element of an implementation-defined set of values. 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. The object representation of a bit-field object is the sequence of N bits taken up by the object, where N is the width of the bit-field (11.4.10 [class.bit]). The value representation of a bit-field object is the set of bits in the object representation that participate in representing its value. Bits in the object representation of a type or object that are not part of the value representation are padding bits.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.[ Footnote: ... ]
(From submission #635.)
Subclause 6.8.1 [basic.types.general] paragraph 4 specifies:
... The value representation of a type T is the set of bits in the object representation of T that participate in representing a value of type T. ... For trivially copyable types, the value representation is a set of bits in the object representation that determines a value, ... [ Footnote: ... ]
It is unclear what difference is intended between "participate in representing a value" and "determines a value". If there is no difference, it is unclear why one of the statements applies only to trivially copyable types. The standard does not seem to refer to the value representation of types that are not trivially copyable.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-11-08 13:26:45 | admin | set | messages: + msg7876 |
2024-11-08 00:00:00 | admin | create |