C++ Logo


Advanced search

Subject: Re: [std-proposals] Allowing access to object representations
From: Language Lawyer (language.lawyer_at_[hidden])
Date: 2019-08-17 18:00:16

On 18/08/2019 01:58, Language Lawyer wrote:
> You propose:
>> Insert a new paragraph below [expr.reinterpret.cast] p6
>> A prvalue v of object pointer type "pointer to cv1 T1" pointing to an object a can be explicitly converted to an object pointer of a different type "pointer to cv2 T2", where cv2 is the same cv-qualification as, or greater cv-qualification than cv1, the result of which is defined as follows:
>> — f T1 is a contiguous-layout type and T2 is unsigned char, char or std::byte, the result is a pointer to the first element of the object representation of a.
> Is there much sense in specifying casts to `char` or `std::byte` as giving a pointer to the first element of the object representation?

Fix: casts to "pointer to cv2 `char`" or "pointer to cv2 `std::byte`"

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

Standard Proposals Archives on Google Groups