//===----------------------------------------------------------------------===// // // 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; // string_type transform(const charT* low, const charT* high) const; #include #include #include int main() { std::locale l = std::locale::classic(); { std::string x("1234"); const std::collate& f = std::use_facet >(l); assert(f.transform(x.data(), x.data() + x.size()) == x); } { std::wstring x(L"1234"); const std::collate& f = std::use_facet >(l); assert(f.transform(x.data(), x.data() + x.size()) == x); } }