//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // class collate // : public locale::facet { // public: // typedef charT char_type; // typedef basic_stringstring_type; // // static locale::id id; // }; #include #include #include int main() { std::locale l = std::locale::classic(); { assert(std::has_facet >(l)); const std::collate& f = std::use_facet >(l); { (void)std::collate::id; } static_assert((std::is_same::char_type, char>::value), ""); static_assert((std::is_same::string_type, std::string>::value), ""); static_assert((std::is_base_of >::value), ""); } { assert(std::has_facet >(l)); const std::collate& f = std::use_facet >(l); { (void)std::collate::id; } static_assert((std::is_same::char_type, wchar_t>::value), ""); static_assert((std::is_same::string_type, std::wstring>::value), ""); static_assert((std::is_base_of >::value), ""); } }