//===----------------------------------------------------------------------===// // // 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 ctype_byname // : public ctype // { // public: // explicit ctype_byname(const char*, size_t = 0); // explicit ctype_byname(const string&, size_t = 0); // // protected: // ~ctype_byname(); // }; #include #include #include #include "platform_support.h" // locale name macros int main() { { std::locale l(LOCALE_en_US_UTF_8); { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } } { std::locale l(""); { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } } { std::locale l("C"); { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } { assert(std::has_facet >(l)); assert(&std::use_facet >(l) == &std::use_facet >(l)); } } }