1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // REQUIRES: locale.en_US.UTF-8
13 // template <class charT> struct regex_traits;
20 #include "test_macros.h"
21 #include "platform_support.h" // locale name macros
26 std::regex_traits
<char> t
;
27 assert(t
.getloc().name() == "C");
29 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
31 std::regex_traits
<wchar_t> t
;
32 assert(t
.getloc().name() == "C");
36 std::locale::global(std::locale(LOCALE_en_US_UTF_8
));
37 std::regex_traits
<char> t
;
38 assert(t
.getloc().name() == LOCALE_en_US_UTF_8
);
40 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
42 std::locale::global(std::locale(LOCALE_en_US_UTF_8
));
43 std::regex_traits
<wchar_t> t
;
44 assert(t
.getloc().name() == LOCALE_en_US_UTF_8
);