Created on 2019-09-16.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4830.
Modify [re.regex], class template basic_regex synopsis, as indicated:
[…]
// [re.regex.assign], assign
[…]
basic_regex& assign(const charT* ptr, flag_type f = regex_constants::ECMAScript);
basic_regex& assign(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript);
template<class string_traits, class A>
basic_regex& assign(const basic_string<charT, string_traits, A>& s,
flag_type f = regex_constants::ECMAScript);
template<class InputIterator>
basic_regex& assign(InputIterator first, InputIterator last,
flag_type f = regex_constants::ECMAScript);
basic_regex& assign(initializer_list<charT>,
flag_type = regex_constants::ECMAScript);
[…]
[ 2019-10-31 Issue Prioritization ]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
The declaration of the overload of basic_regex<>::assign(const charT* p, size_t len, flag_type f) has an inconsistent default argument for the flag_type f parameter.
[re.regex] p3:basic_regex& assign(const charT* p, size_t len, flag_type f);
[re.regex.assign] before p12:
basic_regex& assign(const charT* ptr, size_t len, flag_type f = regex_constants::ECMAScript);
Since all other overloads have a default argument in both [re.regex] and [re.regex.assign] I propose to add a default argument for this overload in the declaration in [re.regex].
It should be pointed out that there exists implementation divergence due to the current wording state: libc++ and libstdc++ do not implement the default argument. The MS STL library does have the default argument.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-10-31 18:49:00 | admin | set | messages: + msg10714 |
2019-10-31 18:49:00 | admin | set | status: new -> ready |
2019-09-22 17:54:30 | admin | set | messages: + msg10662 |
2019-09-16 00:00:00 | admin | create |