Remove building with NOCRYPTO option
[minix3.git] / external / bsd / libc++ / dist / libcxx / test / re / re.traits / getloc.pass.cpp
blob27ab6cd8654569e6ccda77a7d9ce07c21c5d346a
1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 // <regex>
12 // template <class charT> struct regex_traits;
14 // locale_type getloc()const;
16 #include <regex>
17 #include <cassert>
19 #include "platform_support.h" // locale name macros
21 int main()
24 std::regex_traits<char> t1;
25 assert(t1.getloc().name() == "C");
26 std::regex_traits<wchar_t> t2;
27 assert(t2.getloc().name() == "C");
30 std::locale::global(std::locale(LOCALE_en_US_UTF_8));
31 std::regex_traits<char> t1;
32 assert(t1.getloc().name() == LOCALE_en_US_UTF_8);
33 std::regex_traits<wchar_t> t2;
34 assert(t2.getloc().name() == LOCALE_en_US_UTF_8);