Date: Mon, 9 Mar 2026 14:01:12 -0400
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?*/}
>
> On Sat, 28 Feb 2026 at 10:04, Jan Schultke <janschultke_at_[hidden]> wrote:
>>
>> Hi,
>>
>> https://isocpp.org/files/papers/D4039R0.html
>>
>> In the recent discussion of D4040R0, it was brought up that C2y now provides the guarantee that hexadecimal digit characters are contiguous. This was done by https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3192%2epdf
>>
>> I've drafted up a proposal that adopts that guarantee into C++. Feedback is welcome.
>>
>> I expect we can make this a DR against C++98 and pretend it's always been guaranteed.
>>
>>
>>
>> Jan
>
> 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?*/}
>
> On Sat, 28 Feb 2026 at 10:04, Jan Schultke <janschultke_at_[hidden]> wrote:
>>
>> Hi,
>>
>> https://isocpp.org/files/papers/D4039R0.html
>>
>> In the recent discussion of D4040R0, it was brought up that C2y now provides the guarantee that hexadecimal digit characters are contiguous. This was done by https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3192%2epdf
>>
>> I've drafted up a proposal that adopts that guarantee into C++. Feedback is welcome.
>>
>> I expect we can make this a DR against C++98 and pretend it's always been guaranteed.
>>
>>
>>
>> Jan
Received on 2026-03-09 18:01:26
