types.pass.cpp revision b64f8b07c104c6cc986570ac8ee0ed16a9f23976
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 <class charT, class OutputIterator = ostreambuf_iterator<charT> >
13// class num_put
14//     : public locale::facet
15// {
16// public:
17//     typedef charT          char_type;
18//     typedef OutputIterator iter_type;
19
20#include <locale>
21#include <iterator>
22#include <type_traits>
23
24int main()
25{
26    static_assert((std::is_base_of<std::locale::facet, std::num_put<char> >::value), "");
27    static_assert((std::is_base_of<std::locale::facet, std::num_put<wchar_t> >::value), "");
28    static_assert((std::is_same<std::num_put<char>::char_type, char>::value), "");
29    static_assert((std::is_same<std::num_put<wchar_t>::char_type, wchar_t>::value), "");
30    static_assert((std::is_same<std::num_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), "");
31    static_assert((std::is_same<std::num_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), "");
32}
33