summaryrefslogtreecommitdiffstats
path: root/test/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp
blob: 67a9c62caa742096b31a65ab96d5867b32dd9942 (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 CharT> 
// class ctype
//     : public locale::facet,
//       public ctype_base
// {
// public: 
//     typedef CharT char_type; 
// };

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

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