summaryrefslogtreecommitdiffstats
path: root/test/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp
blob: b2e2fcbb0d1da31014640942887fea17dd5fce34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// <locale>

// template <> 
// class ctype<char>
//     : public locale::facet,
//       public ctype_base
// {
// public: 
//     typedef char char_type; 
// };

#include <locale>
#include <type_traits>
#include <cassert>

int main()
{
    std::locale l = std::locale::classic();
    {
        assert(std::has_facet<std::ctype<char> >(l));
        const std::ctype<char>& f = std::use_facet<std::ctype<char> >(l);
        {
            (void)std::ctype<char>::id;
        }
        static_assert((std::is_same<std::ctype<char>::char_type, char>::value), "");
        static_assert((std::is_base_of<std::ctype_base, std::ctype<char> >::value), "");
        static_assert((std::is_base_of<std::locale::facet, std::ctype<char> >::value), "");
    }
}