C++ Logo

STD-DISCUSSION

Advanced search

Subject: Values of objects
From: sdkrystian (sdkrystian_at_[hidden])
Date: 2019-08-25 21:22:25


The standard only defines what the *value* is for objects of trivially copyable types, and it is left unspecified as to what the value of objects of non-trivially copyable types is, however it can be inferred that they do have value, since the value representation is what represents it.My question is, why is it not specified that all objects have value, and then only specify that the value representation of an object of trivially copyable type appears inside the object representation. Something like:> The *value representation* of an object of type T is the set of bits that participate in representing a *value* of type T; for objects of trivially copyable type, the value representation is within the object representation.Surely this would be more explicit, and better illustrate that the value representation (and by association, value) for objects of non-trivially copyable type need not be fully contained within the object itself. 



STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups