imbue.pass.cpp revision b64f8b07c104c6cc986570ac8ee0ed16a9f23976
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")); 25 assert(loc.name() == "C"); 26 assert(t.getloc().name() == "en_US"); 27 } 28} 29