2010-06-17 00:34:59 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2010-11-16 22:09:02 +00: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 00:34:59 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// <regex>
|
|
|
|
|
|
|
|
// template <class charT> struct regex_traits;
|
|
|
|
|
|
|
|
// locale_type getloc()const;
|
|
|
|
|
|
|
|
#include <regex>
|
2010-06-21 21:01:43 +00:00
|
|
|
#include <cassert>
|
2010-06-17 00:34:59 +00:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2010-06-21 21:01:43 +00:00
|
|
|
{
|
|
|
|
std::regex_traits<char> t1;
|
|
|
|
assert(t1.getloc().name() == "C");
|
|
|
|
std::regex_traits<wchar_t> t2;
|
|
|
|
assert(t2.getloc().name() == "C");
|
|
|
|
}
|
|
|
|
{
|
|
|
|
std::locale::global(std::locale("en_US"));
|
|
|
|
std::regex_traits<char> t1;
|
|
|
|
assert(t1.getloc().name() == "en_US");
|
|
|
|
std::regex_traits<wchar_t> t2;
|
|
|
|
assert(t2.getloc().name() == "en_US");
|
|
|
|
}
|
2010-06-17 00:34:59 +00:00
|
|
|
}
|