C++ Logo

STD-DISCUSSION

Advanced search

Subject: Difference in default argument re.regex vs. re.regex.assign
From: Mark de Wever (koraq_at_[hidden])
Date: 2019-09-05 14:49:39


I've been looking at the regex documentation in N4830 and see an
inconsistency:

[re.regex]
basic_regex& assign(const charT* p, size_t len, flag_type f);

[re.regex.assign]
basic_regex& assign(const charT* ptr, size_t len, flag_type f =
regex_constants::ECMAScript);

Is the difference in the default argument between to two places a
defect? I assume it is and I should file a DR. IMO it should be
defaulted to regex_constants::ECMAScript at both places. At least one
implementation (libc++) implements the assignment without a default
argument.

Is this a real defect? Should it be a DR or an editorial issue?

Kind regards,
Mark de Wever

PS: I consider the difference between p and ptr and an editorial issue
and will create a pull request at GitHub. There are some other editorial
issues here which will be added in the same pull request.


STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups