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 // <regex> 11 12 // template <class charT> struct regex_traits; 13 14 // locale_type imbue(locale_type l); 15 16 #include <regex> 17 #include <locale> 18 #include <cassert> 19 20 #include "platform_support.h" // locale name macros 21 main()22int main() 23 { 24 { 25 std::regex_traits<char> t; 26 std::locale loc = t.imbue(std::locale(LOCALE_en_US_UTF_8)); 27 assert(loc.name() == "C"); 28 assert(t.getloc().name() == LOCALE_en_US_UTF_8); 29 } 30 } 31