C++ Logo

std-proposals

Advanced search

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

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 16 May 2025 16:13:19 +0200
> 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).
This would bypass the first bullet because we don't want to deprecate
int to char32_t conversion.

Received on 2025-05-16 14:13:32