C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D4040R0 Case ranges

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Fri, 27 Feb 2026 18:23:19 +0000
On Fri, 27 Feb 2026 at 18:03, Jan Schultke via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> > if (c >= 'a' && c <= 'z')
>>
>> This relies on ASCII being used, which I think should be mentioned.
>> Somewhat
>> related, but C2Y is standardizing sequential hex digits so case'a'...'f'
>> and
>> case'A'...'F' will work regardless of the character set used.
>>
>
> Do you have a link for that?
>

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3192.pdf


>
>
>> > case 0...9 is not valid because 0. and .9 are parsed as
>> floating-point-literals, with one . between.
>>
>> 0...9 is parsed as one pp-number, rather than three tokens.
>>
>
> Hmm, I was under the impression that the pp-tokens are broken up into one
> or more tokens, so that's what you would eventually get those three tokens
> out of it.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2026-02-27 18:23:36