C++ Logo

sg16

Advanced search

Re: D2626R0 charN_t incremental adoption: Casting pointers of UTF character types

From: Hubert Tong <hubert.reinterpretcast_at_[hidden]>
Date: Fri, 26 Aug 2022 00:00:57 -0400
On Wed, Aug 3, 2022 at 11:38 PM Hubert Tong <
hubert.reinterpretcast_at_[hidden]> wrote:

> On Sat, Jul 30, 2022 at 2:16 PM Corentin via SG16 <sg16_at_[hidden]>
> wrote:
>
>> Early draft, feedback welcome.
>>
>> Thanks,
>> Corentin
>>
>> https://isocpp.org/files/papers/D2626R0.pdf
>>
>
> The pointer+size overloads will end the lifetime of class objects if they
> end the lifetime of class members.
>

As promised from Wednesday: The wording that ends the lifetime of the
containing object (in the case where the replacing "string" is not "nested
within" the containing object) is 6.7.3 [basic.life]/1. Placing the string
inside an appropriate union will avoid the issue.


> The constexpr-ness requires input from EDG, MSVC, and GCC implementers.
>
>
>> --
>> SG16 mailing list
>> SG16_at_[hidden]
>> https://lists.isocpp.org/mailman/listinfo.cgi/sg16
>>
>

Received on 2022-08-26 04:01:26