C++ Logo

sg16

Advanced search

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

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Thu, 9 Apr 2020 00:00:44 +0200
On 08/04/2020 23.49, Zach Laine via SG16 wrote:
> On Wed, Apr 8, 2020 at 4:38 PM Jens Maurer via SG16 <sg16_at_[hidden] <mailto: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.

Yes. Be disturbed.

Jens

Received on 2020-04-08 17:03:41