imbue.pass.cpp revision 9e02b90405a62bfbdabe9dbf4e6f8936c862d6ea
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 20int main() 21{ 22 { 23 std::regex_traits<char> t; 24 std::locale loc = t.imbue(std::locale("en_US.UTF-8")); 25 assert(loc.name() == "C"); 26 assert(t.getloc().name() == "en_US.UTF-8"); 27 } 28} 29