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 getloc()const;
|
|
|
|
|
|
|
|
#include <regex>
|
2010-06-21 23:01:43 +02:00
|
|
|
#include <cassert>
|
2010-06-17 02:34:59 +02:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2010-06-21 23:01:43 +02:00
|
|
|
{
|
|
|
|
std::regex_traits<char> t1;
|
|
|
|
assert(t1.getloc().name() == "C");
|
|
|
|
std::regex_traits<wchar_t> t2;
|
|
|
|
assert(t2.getloc().name() == "C");
|
|
|
|
}
|
|
|
|
{
|
2011-09-21 19:38:03 +02:00
|
|
|
std::locale::global(std::locale("en_US.UTF-8"));
|
2010-06-21 23:01:43 +02:00
|
|
|
std::regex_traits<char> t1;
|
2011-09-21 19:38:03 +02:00
|
|
|
assert(t1.getloc().name() == "en_US.UTF-8");
|
2010-06-21 23:01:43 +02:00
|
|
|
std::regex_traits<wchar_t> t2;
|
2011-09-21 19:38:03 +02:00
|
|
|
assert(t2.getloc().name() == "en_US.UTF-8");
|
2010-06-21 23:01:43 +02:00
|
|
|
}
|
2010-06-17 02:34:59 +02:00
|
|
|
}
|