Index: include/regex =================================================================== --- include/regex +++ include/regex @@ -127,6 +127,8 @@ public: // types: typedef charT value_type; + typedef traits traits_type; + typedef typename traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename traits::locale_type locale_type; @@ -2475,6 +2477,8 @@ public: // types: typedef _CharT value_type; + typedef _Traits traits_type; + typedef typename _Traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename _Traits::locale_type locale_type; Index: test/std/re/re.regex/types.pass.cpp =================================================================== --- test/std/re/re.regex/types.pass.cpp +++ test/std/re/re.regex/types.pass.cpp @@ -15,6 +15,8 @@ // public: // // types: // typedef charT value_type; +// typedef traits traits_type; +// typedef typename traits::string_type string_type; // typedef regex_constants::syntax_option_type flag_type; // typedef typename traits::locale_type locale_type; @@ -25,11 +27,15 @@ int main() { static_assert((std::is_same::value_type, char>::value), ""); + static_assert((std::is_same::traits_type, std::regex_traits >::value), ""); + static_assert((std::is_same::string_type, std::basic_string >::value), ""); static_assert((std::is_same::flag_type, std::regex_constants::syntax_option_type>::value), ""); static_assert((std::is_same::locale_type, std::locale>::value), ""); static_assert((std::is_same::value_type, wchar_t>::value), ""); + static_assert((std::is_same::traits_type, std::regex_traits >::value), ""); + static_assert((std::is_same::string_type, std::basic_string >::value), ""); static_assert((std::is_same::flag_type, std::regex_constants::syntax_option_type>::value), ""); static_assert((std::is_same::locale_type, std::locale>::value), "");