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
|
|
|
|
2013-01-05 04:21:01 +01:00
|
|
|
#include "platform_support.h" // locale name macros
|
2011-10-03 17:23:59 +02:00
|
|
|
|
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-10-03 17:23:59 +02:00
|
|
|
std::locale::global(std::locale(LOCALE_en_US_UTF_8));
|
2010-06-21 23:01:43 +02:00
|
|
|
std::regex_traits<char> t1;
|
2011-10-03 17:23:59 +02:00
|
|
|
assert(t1.getloc().name() == LOCALE_en_US_UTF_8);
|
2010-06-21 23:01:43 +02:00
|
|
|
std::regex_traits<wchar_t> t2;
|
2011-10-03 17:23:59 +02:00
|
|
|
assert(t2.getloc().name() == LOCALE_en_US_UTF_8);
|
2010-06-21 23:01:43 +02:00
|
|
|
}
|
2010-06-17 02:34:59 +02:00
|
|
|
}
|