C++ Logo

sg16

Advanced search

Re: [SG16] Feedback on P1854: Conversion to literal encoding should not lead to loss of meaning

From: Hubert Tong <hubert.reinterpretcast_at_[hidden]>
Date: Fri, 29 Oct 2021 10:54:53 -0400
On Fri, Oct 29, 2021 at 9:30 AM Corentin <corentin.jabot_at_[hidden]> wrote:

>
>
> On Fri, Oct 29, 2021 at 3:15 PM Jens Maurer <Jens.Maurer_at_[hidden]> wrote:
>
>>
>> I think we just want to say "If a character literal contains a c-char
>> other than a numeric-escape-sequence
>> that cannot be encoded as a single code unit in the ordinary literal
>> encoding, the program is ill-formed."
>>
>
> Agreed
>

The text containing the restriction that *numeric-escape-sequence*s specify
values that "fit" into the "character" type is under a bullet saying "[the]
value of any other kind of *character-literal* is determined as follows"
occuring after "[a] multicharacter literal has an implementation-defined
value". I believe that we want that restriction to also apply in
multicharacter literal cases. Additionally, whether a
numeric-escape-sequence can be "encoded as a single code unit in the
ordinary literal encoding" seems to need the wording from the "other than
multicharacter literal" case.


>
>
>>
>> Jens
>>
>

Received on 2021-10-29 09:55:22