C++ Logo


Advanced search

Subject: Re: Problem of the type requirement of the regex library
From: Thiago Macieira (thiago_at_[hidden])
Date: 2019-12-25 15:18:07

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.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups