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//===----------------------------------------------------------------------===//
9
10// <locale>
11
12// template <>
13// class ctype<char>
14//     : public locale::facet,
15//       public ctype_base
16// {
17// public:
18//     typedef char char_type;
19// };
20
21#include <locale>
22#include <type_traits>
23#include <cassert>
24
25int main()
26{
27    std::locale l = std::locale::classic();
28    {
29        assert(std::has_facet<std::ctype<char> >(l));
30        const std::ctype<char>& f = std::use_facet<std::ctype<char> >(l);
31        {
32            (void)std::ctype<char>::id;
33        }
34        static_assert((std::is_same<std::ctype<char>::char_type, char>::value), "");
35        static_assert((std::is_base_of<std::ctype_base, std::ctype<char> >::value), "");
36        static_assert((std::is_base_of<std::locale::facet, std::ctype<char> >::value), "");
37    }
38}
39