C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D4039R0 Sequential hexadecimal digits

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Mon, 9 Mar 2026 18:39:26 +0000
On Mon, 9 Mar 2026 at 18:01, Halalaluyafail3 <luigighiron_at_[hidden]> wrote:

> On Mon, Mar 9, 2026 at 5:08 AM Jan Schultke <janschultke_at_[hidden]>
> wrote:
> >
> > I think there's another useful guarantee that could be provided, but I'm
> not sure whether it should be done as part of this proposal: In any
> encoding, it looks like alphabetic characters always appear in their
> lexicographical order, even if they aren't always contiguous.
> >
> > Consequently, (a <=> b) is meaningful and useful between two characters
> if you know that a and b are letters.
>
> Letters of the same case. To make it somewhat useful between different
> cases it
> would require guaranteeing 'Z'<'a' or 'z'<'A' being true. Only somewhat
> related,
> but the C++ standard does not currently have a definition of letter like C
> does.
> Therefore it is unclear whether or not this is valid:
>
> int main(){int _\u0393;/*reserved?*/}
>

There is no reason for the implementation to reserve such names. It would
be a no-op to change [lex.name] to say uppercase letter from the basic
character set.

Received on 2026-03-09 18:39:43