This all looks reasonable to me, but I wonder about the class __bracket_expression, which also contains reference to ctype_base::mask. Should those be changed to std::regex_traits<_CharT>::char_class_type as well? See lines 2187, 2188, 2284 and 2287 of <regex> http://reviews.llvm.org/D4642