<regex>: Make wregex properly match the combination of \w and another named character class by muellerj2 · Pull Request #5438 · microsoft/STL (original) (raw)

Fixes #5243 by repurposing another unused flag bit when the combined character class of "w" and another named class has to be represented.

After this PR, a different value is assigned to the _Classes field in the NFA node when we run into the buggy scenario, but the code takes care that the same value is assigned in all other cases. This means that the old matcher may only match different characters in the buggy scenario for code points >= 0x100: It will now match the members of the other named character classes rather than the members of the character class "w".