C++ Logo

sg16

Advanced search

Re: [isocpp-sg16] pp-number does not make sense to me

From: Nevin Liber <nevin_at_[hidden]>
Date: Thu, 9 Jul 2026 11:36:02 -0500
On Thu, Jul 9, 2026 at 11:30 AM Corentin via SG16 <sg16_at_[hidden]>
wrote:

> I was trying to please people who aim to enrich their code by spreading
> dollar signs.
>
> I started to look at the definition of pp-number and found an adjacent
> issue.
> https://eel.is/c++draft/lex.ppnumber#nt:pp-number.
>
> By that grammar
>
> #define A 10∞ // pp-number
> #define B 1'0∞ // pp-number
> #define C 1'∞0 // not a pp-number
>
> I struggle to understand the logic here.
> The good thing is that we are consistent with C.
>
> But... I think we should restrict the grammar to digit/non-digit.
> Not only it would simplify implementations, be more self-consistent and
> avoid issues with non-basic-latin unicode digits,
> including confusables.
>

For those implementations that support both C++ and C, does this really
simplify implementations?

I really don't see much motivation here for changing this...
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden] <nevin_at_[hidden]>>
+1-847-691-1404

Received on 2026-07-09 16:36:45