blob: df6d6f183e4363d58321f983e334f66695782d6a [file] [log] [blame]
Howard Hinnant70505302010-06-17 00:34:59 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant70505302010-06-17 00:34:59 +00007//
8//===----------------------------------------------------------------------===//
9
10// <regex>
11
12// template <class charT> struct regex_traits;
13
14// locale_type getloc()const;
15
16#include <regex>
Howard Hinnant24757ff2010-06-21 21:01:43 +000017#include <cassert>
Howard Hinnant70505302010-06-17 00:34:59 +000018
19int main()
20{
Howard Hinnant24757ff2010-06-21 21:01:43 +000021 {
22 std::regex_traits<char> t1;
23 assert(t1.getloc().name() == "C");
24 std::regex_traits<wchar_t> t2;
25 assert(t2.getloc().name() == "C");
26 }
27 {
28 std::locale::global(std::locale("en_US"));
29 std::regex_traits<char> t1;
30 assert(t1.getloc().name() == "en_US");
31 std::regex_traits<wchar_t> t2;
32 assert(t2.getloc().name() == "en_US");
33 }
Howard Hinnant70505302010-06-17 00:34:59 +000034}