Howard Hinnant | 3257c98 | 2010-06-17 00:34:59 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
Howard Hinnant | 0ce0224 | 2010-09-28 17:19:10 +0000 | [diff] [blame] | 2 | //===----------------------------------------------------------------------===// |
Howard Hinnant | 3257c98 | 2010-06-17 00:34:59 +0000 | [diff] [blame] | 3 | // |
| 4 | // The LLVM Compiler Infrastructure |
| 5 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | 3257c98 | 2010-06-17 00:34:59 +0000 | [diff] [blame] | 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> |
Howard Hinnant | 3257c98 | 2010-06-17 00:34:59 +0000 | [diff] [blame] | 23 | |
| 24 | int main() |
| 25 | { |
| 26 | static_assert((std::is_same<std::regex_traits<char>::char_type, char>::value), ""); |
| 27 | static_assert((std::is_same<std::regex_traits<char>::string_type, std::string>::value), ""); |
| 28 | static_assert((std::is_same<std::regex_traits<char>::locale_type, std::locale>::value), ""); |
| 29 | static_assert((std::is_same<std::regex_traits<wchar_t>::char_type, wchar_t>::value), ""); |
| 30 | static_assert((std::is_same<std::regex_traits<wchar_t>::string_type, std::wstring>::value), ""); |
| 31 | static_assert((std::is_same<std::regex_traits<wchar_t>::locale_type, std::locale>::value), ""); |
| 32 | } |