C++ Logo


Advanced search

Re: Problem of the type requirement of the regex library

From: Tom Honermann <tom_at_[hidden]>
Date: Sat, 28 Dec 2019 16:25:09 -0500
On 12/25/19 4:18 PM, Thiago Macieira via Std-Discussion wrote:
> On Tuesday, 24 December 2019 04:47:36 -03 Xie He via Std-Discussion wrote:
>> In 30.1 [re.general] Paragraph 2, change "char-like template
>> arguments" to "template arguments that are integral types that encode
>> Unicode code point values, with char_traits<the type> having its
>> two-parameter assign, eq and lt functions provide identical results as
>> the =, ==, < operators, for all valid code points the type supports".
> I would go MUCH further: the regular expression library should be restricted
> to char8_t, char16_t and char32_t. For compatibility reasons, char is
> interpreted as char8_t. No other encodings or types.

That would be a significant break to existing code, particularly for
non-ASCII based implementations.


> Users who roll out their strings based on a different character type are
> welcome to convert their strings to one of the three above before using the
> regular expression library.

Received on 2019-12-28 15:27:39