summaryrefslogtreecommitdiffstats
path: root/libcxx/test/re/re.traits/default.pass.cpp
blob: 6414a4b9dc3c010556d059cd7d354fb4d4dd56a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <regex>

// template <class charT> struct regex_traits;

// regex_traits();

#include <regex>
#include <cassert>

int main()
{
    {
        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");
    }
}
OpenPOWER on IntegriCloud