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;
15 // locale_type getloc()const;
20 #include "test_macros.h"
21 #include "platform_support.h" // locale name macros
26 std::regex_traits
<char> t1
;
27 assert(t1
.getloc().name() == "C");
28 std::regex_traits
<wchar_t> t2
;
29 assert(t2
.getloc().name() == "C");
32 std::locale::global(std::locale(LOCALE_en_US_UTF_8
));
33 std::regex_traits
<char> t1
;
34 assert(t1
.getloc().name() == LOCALE_en_US_UTF_8
);
35 std::regex_traits
<wchar_t> t2
;
36 assert(t2
.getloc().name() == LOCALE_en_US_UTF_8
);