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