1 // -*- C++ -*- 2 //===----------------------------------------------------------------------===// 3 // 4 // The LLVM Compiler Infrastructure 5 // 6 // This file is dual licensed under the MIT and the University of Illinois Open 7 // Source Licenses. See LICENSE.TXT for details. 8 // 9 //===----------------------------------------------------------------------===// 10 11 // <regex> 12 13 // template <class charT> 14 // struct regex_traits 15 // { 16 // public: 17 // typedef charT char_type; 18 // typedef basic_string<char_type> string_type; 19 // typedef locale locale_type; 20 21 #include <regex> 22 #include <type_traits> 23 #include "test_macros.h" 24 25 int main() 26 { 27 static_assert((std::is_same<std::regex_traits<char>::char_type, char>::value), ""); 28 static_assert((std::is_same<std::regex_traits<char>::string_type, std::string>::value), ""); 29 static_assert((std::is_same<std::regex_traits<char>::locale_type, std::locale>::value), ""); 30 static_assert((std::is_same<std::regex_traits<wchar_t>::char_type, wchar_t>::value), ""); 31 static_assert((std::is_same<std::regex_traits<wchar_t>::string_type, std::wstring>::value), ""); 32 static_assert((std::is_same<std::regex_traits<wchar_t>::locale_type, std::locale>::value), ""); 33 } 34