[PATCH] D22702: [libcxx]Missing default argument for flag_type parameter in one of std::basic_regex constructors
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 09:42:06 PDT 2016
hubert.reinterpretcast added a comment.
Minor concerns noted. I'd be okay with this patch, but would like someone else to give the okay (or indicate what issues need to be addressed).
================
Comment at: include/regex:148
@@ -147,3 +147,3 @@
explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript);
- basic_regex(const charT* p, size_t len, flag_type f);
+ basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript);
basic_regex(const basic_regex&);
----------------
This line has more than 80 characters; however, the file already has such lines. I guess the libc++ project does not enforce the 80-column policy.
================
Comment at: test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp:30
@@ +29,3 @@
+{
+ test("\\(a\\)", 5, 0);
+ test("\\(a[bc]\\)", 9, 0);
----------------
This appears (like `ptr_size_flg.pass.cpp`) to neglect testing `size` in favour of testing `flg`. Which is to say that, perhaps `size` should not always be `strlen(ptr)`.
https://reviews.llvm.org/D22702
More information about the cfe-commits
mailing list