<regex>: Fix character range bounds in case-insensitive regexes by muellerj2 · Pull Request #5164 · microsoft/STL (original) (raw)

This PR deals with three related problems for character ranges in case-insensitive mode:

The PR moves the entire character translation into the parser so that empty ranges can be reliably diagnosed there in case-insensitive mode as well. It also fixes the unsigned cast and removes the unnecessary translate() call.

The test deliberately does not use any manual signed/unsigned casts, but leaves all of these casts to char_traits to avoid getting the casts similarly wrong in <regex> and the test.