types.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <locale>
11
12// template <class _CharT, bool _International = false>
13// class moneypunct
14//     : public locale::facet,
15//       public money_base
16// {
17// public:
18//     typedef _CharT                  char_type;
19//     typedef basic_string<char_type> string_type;
20
21#include <locale>
22#include <type_traits>
23
24int main()
25{
26    static_assert((std::is_base_of<std::locale::facet, std::moneypunct<char> >::value), "");
27    static_assert((std::is_base_of<std::locale::facet, std::moneypunct<wchar_t> >::value), "");
28    static_assert((std::is_base_of<std::money_base, std::moneypunct<char> >::value), "");
29    static_assert((std::is_base_of<std::money_base, std::moneypunct<wchar_t> >::value), "");
30    static_assert((std::is_same<std::moneypunct<char>::char_type, char>::value), "");
31    static_assert((std::is_same<std::moneypunct<wchar_t>::char_type, wchar_t>::value), "");
32    static_assert((std::is_same<std::moneypunct<char>::string_type, std::string>::value), "");
33    static_assert((std::is_same<std::moneypunct<wchar_t>::string_type, std::wstring>::value), "");
34}
35