2010-06-17 02:34:59 +02:00
|
|
|
// -*- C++ -*-
|
2010-09-28 19:19:10 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
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;
|
|
|
|
|
|
|
|
// regex_traits();
|
|
|
|
|
|
|
|
#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");
|
|
|
|
}
|
|
|
|
{
|
|
|
|
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 02:34:59 +02:00
|
|
|
}
|