Page MenuHomePhabricator

Implement LWG 3296
ClosedPublic

Authored by mclow.lists on Sep 23 2019, 6:05 PM.

Details

Summary

https://cplusplus.github.io/LWG/issue3296 says that the call
basic_regex& assign(const charT* ptr, size_t len, flag_type f);
is specified twice: once with a default value for f, and once without.

This patch adds the default value regex_constants::ECMAScript to the final parameter.

Note that MS-STL already has this behavior, while libstdc++ does not.

Diff Detail

Event Timeline

mclow.lists created this revision.Sep 23 2019, 6:05 PM
mclow.lists marked an inline comment as done.Sep 23 2019, 6:06 PM
mclow.lists added inline comments.
libcxx/include/regex
179

Most of this change is just lining up stuff to make it easy to see that it's all the same. The only actual change is line 173

Can you use clang-format instead of custom formatting?

Should we leave some comment or trace that LWG 3296 is complete or has nothing to do when it actually gets accepted?

Otherwise, LGTM.

Can you use clang-format instead of custom formatting?

clang-format would destroy the structure that I added.
Adding that structure was the whole point of the edit (other than line 173, obviously)

Should we leave some comment or trace that LWG 3296 is complete or has nothing to do when it actually gets accepted?

I'll just remember. When I make the list of issues to be resolved for Belfast, I will note that "we already do this"

Otherwise, LGTM.

Thanks.

jwakely resigned from this revision.Sep 25 2019, 5:32 AM

Note that MS-STL already has this behavior, while libstdc++ does not.

Thanks for the heads-up, I've added the default argument in https://gcc.gnu.org/r276121

mclow.lists accepted this revision.Sep 25 2019, 9:42 AM

Committed as revision 372896

This revision is now accepted and ready to land.Sep 25 2019, 9:42 AM
mclow.lists closed this revision.Sep 25 2019, 9:42 AM