//===----------------------------------------------------------------------===// // // 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 numpunct // : public locale::facet // { // public: // typedef charT char_type; // typedef basic_string string_type; // static locale::id id; #include #include #include int main() { std::locale l = std::locale::classic(); { assert(std::has_facet >(l)); const std::numpunct& f = std::use_facet >(l); { (void)std::numpunct::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::numpunct& f = std::use_facet >(l); { (void)std::numpunct::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), ""); } }