2010-06-17 02:34:59 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2010-11-16 23:09:02 +01:00
|
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
// Source Licenses. See LICENSE.TXT for details.
|
2010-06-17 02:34:59 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// <regex>
|
|
|
|
|
|
|
|
// template <class charT> struct regex_traits;
|
|
|
|
|
|
|
|
// locale_type imbue(locale_type l);
|
|
|
|
|
|
|
|
#include <regex>
|
2010-06-21 23:01:43 +02:00
|
|
|
#include <locale>
|
|
|
|
#include <cassert>
|
2010-06-17 02:34:59 +02:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2010-06-21 23:01:43 +02:00
|
|
|
{
|
|
|
|
std::regex_traits<char> t;
|
2011-09-21 19:38:03 +02:00
|
|
|
std::locale loc = t.imbue(std::locale("en_US.UTF-8"));
|
2010-06-21 23:01:43 +02:00
|
|
|
assert(loc.name() == "C");
|
2011-09-21 19:38:03 +02:00
|
|
|
assert(t.getloc().name() == "en_US.UTF-8");
|
2010-06-21 23:01:43 +02:00
|
|
|
}
|
2010-06-17 02:34:59 +02:00
|
|
|
}
|