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