You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a program attempts to access the stored value of an object through a glvalue whose type is not similar ([conv.qual]) to one of the following types the behavior is undefined:
the dynamic type of the object,
a type that is the signed or unsigned type corresponding to the dynamic type of the object, or
a char, unsigned char, or std::byte type.
so we can access the value of any object with char, unsigned char and std::byte types.
However we cannot provide storage with use of char:
intro.object.3 says, that:
If a complete object is created ([expr.new]) in storage associated with another object e of type “array of N unsigned char” or of type “array of N std::byte” ([cstddef.syn]), that array provides storage for the created object if:
Is this asymmetry intended?
Shouldn't intro.object.3 sound like:
If a complete object is created ([expr.new]) in storage associated with another object e of type “array of N unsigned char” or type "array of N char", or of type “array of N std::byte” ([cstddef.syn]), that array provides storage for the created object if:
The text was updated successfully, but these errors were encountered:
basic.lval.11 says, that:
so we can access the value of any object with char, unsigned char and std::byte types.
However we cannot provide storage with use of char:
intro.object.3 says, that:
Is this asymmetry intended?
Shouldn't intro.object.3 sound like:
The text was updated successfully, but these errors were encountered: