C++ Logo

sg16

Advanced search

Re: [SG16] Just realized that the UCN is not a single character

From: Zach Laine <whatwasthataddress_at_[hidden]>
Date: Wed, 8 Apr 2020 16:49:42 -0500
On Wed, Apr 8, 2020 at 4:38 PM Jens Maurer via SG16 <sg16_at_[hidden]>
wrote:

> On 08/04/2020 23.27, Hubert Tong via SG16 wrote:
> > Seems GCC is right again...
> >
> > \u0300, whether the result of forming a UCN or physically present as a
> UCN is a string of six characters from the basic source character set...
>
> So, it's six characters, so
>
> #define accent(x) x ## \u0300
>
> becomes
>
>
> #define accent(x) x ## \ u0300
>
> with \ a lone character and u0300 a separate preprocessing-token /
> identifier.
>
> Disturbing UCNs like that is really counter-intuitive.
> We should fix that.
>
> Jens
>

Does that also imply that this:

#define accent(x) x ## \u0300

and this:

#define accent(x) x ## `

are not equivalent? If so, I'm even more disturbed.

Zach

Received on 2020-04-08 16:52:48