C++ Logo


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, 5 Nov 2021 22:05:07 -0400
The current R2 draft has this:

> A multicharacter literal shall not have an encoding prefix. Each character
> represented by a *basic-c-char* or a *universal-character-name* in a
> multicharacter literal shall be encodable as a single code unit in the
> narrow literal encoding.

The above does not provide a restriction on *conditional-escape-sequence*s
and *numeric-escape-sequence*s in multicharacter literals. We presumably
only want to allow ones that are valid as the sole *c-char* in a
*character-literal* with no encoding prefix. Indeed, that general
description may be sufficient for all forms of *c-char*.

Also, the title of the paper is not particularly helpful in terms of
indicating what it proposes. I think something like "Support only
straightforward multicharacter literals and encodable string literals"
would be better.

-- HT

Received on 2021-11-05 21:05:37