Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing C++11's std::ctype_base::blank in cpp_regex_traits.hpp #19

Open
blazej-czapp opened this issue May 14, 2021 · 1 comment
Open

Comments

@blazej-czapp
Copy link

cpp_regex_traits.hpp introduces its own locale ctype masks on top of the standard ones (starting here). It relies on first combining all standard flags (here) and then finding some unused bits for its own masks.

The block of masks being or'd is missing std::ctype_base::blank, which was introduced in C++11.

As a side note, it all happens to work fine in libc++ because:

 00000110 11111111  all_ctype_masks
 00000001 00000000  ctype_base::blank

 10000000 00000000  non_std_ctype_underscore
 01000000 00000000  non_std_ctype_blank
 00100000 00000000  non_std_ctype_newline

i.e. the mask for blank isn't conflicting with the non_std ones, but that's, of course, sheer luck.

@ericniebler
Copy link
Member

Nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants