Date: Wed, 25 Dec 2019 18:18:07 -0300
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.
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.
> 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.
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.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel System Software Products
Received on 2019-12-25 15:20:37