C++ Logo

std-proposals

Advanced search

Re: [std-proposals] P3695R0 Deprecate implicit conversions between char8_t, char16_t, and char32_t

From: Christof Meerwald <cmeerw_at_[hidden]>
Date: Fri, 16 May 2025 16:49:59 +0200
On Fri, May 16, 2025 at 04:13:19PM +0200, Jan Schultke via Std-Proposals wrote:
> > Does this also deprecate "static_cast<char32_t>(u8' ')"?
>
> It's not intended to, but looking at
> https://eel.is/c++draft/expr.static.cast#5, the proposed wording
> inadvertently does.
>
> > In the change of [conv.integral] paragraph 1 - why is the second
> > bullet needed? (btw, missing "is"?)
>
> Yes, there is a typo indeed.
> The second bullet is needed because in a char8_t to char32_t
> conversion sequences, char8_t is first promoted to int (typically).

I don't think that's the case - and that would seem to contradict
[conv.general]/1.2 (i.e., you can either have an integral promotion or
an integral conversion, but not both in a standard conversion
sequence).


Christof

-- 
https://cmeerw.org                             sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

Received on 2025-05-16 14:50:03