blob: 50586a1f29f37eb27f85a29ba43c20bc4ef18cb9 [file] [log] [blame]
Howard Hinnant3257c982010-06-17 00:34:59 +00001// -*- C++ -*-
Howard Hinnant0ce02242010-09-28 17:19:10 +00002//===----------------------------------------------------------------------===//
Howard Hinnant3257c982010-06-17 00:34:59 +00003//
4// The LLVM Compiler Infrastructure
5//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00006// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant3257c982010-06-17 00:34:59 +00008//
9//===----------------------------------------------------------------------===//
10
11// <regex>
12
13// template <class charT>
14// struct regex_traits
15// {
16// public:
17// typedef charT char_type;
18// typedef basic_string<char_type> string_type;
19// typedef locale locale_type;
20
21#include <regex>
22#include <type_traits>
Howard Hinnant3257c982010-06-17 00:34:59 +000023
24int main()
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}