Currently when a regular expression contains an invalid character
class name std::regex constructors throw an std::regex_error with
std::regex_constants::error_brack code.
This patch changes the code to std::regex_constants::error_ctype and
adds a test.
I'm a big fan of the "return NOW" style of programming.
But this matches the other tests, so I'm ok with it.
(If I care enough, I'll change them all later)
try { std::regex re(pat); } catch catch (const std::regex_error &ex) { return ex.code() == std::regex_constants::error_ctype; } return false;