1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <regex>
11 
12 // template <class charT>
13 // struct regex_traits
14 // {
15 // public:
16 //     typedef charT                   char_type;
17 //     typedef basic_string<char_type> string_type;
18 //     typedef locale                  locale_type;
19 
20 #include <regex>
21 #include <type_traits>
22 #include "test_macros.h"
23 
main(int,char **)24 int main(int, char**)
25 {
26     static_assert((std::is_same<std::regex_traits<char>::char_type, char>::value), "");
27     static_assert((std::is_same<std::regex_traits<char>::string_type, std::string>::value), "");
28     static_assert((std::is_same<std::regex_traits<char>::locale_type, std::locale>::value), "");
29     static_assert((std::is_same<std::regex_traits<wchar_t>::char_type, wchar_t>::value), "");
30     static_assert((std::is_same<std::regex_traits<wchar_t>::string_type, std::wstring>::value), "");
31     static_assert((std::is_same<std::regex_traits<wchar_t>::locale_type, std::locale>::value), "");
32 
33   return 0;
34 }
35