1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// <locale>
10
11// template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
12// class num_put
13// : public locale::facet
14// {
15// public:
16// typedef charT char_type;
17// typedef OutputIterator iter_type;
18
19#include <locale>
20#include <iterator>
21#include <type_traits>
22
23#include "test_macros.h"
24
25int main(int, char**) {
26 static_assert((std::is_base_of<std::locale::facet, std::num_put<char> >::value), "");
27 static_assert((std::is_same<std::num_put<char>::char_type, char>::value), "");
28 static_assert((std::is_same<std::num_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), "");
29
30#ifndef TEST_HAS_NO_WIDE_CHARACTERS
31 static_assert((std::is_base_of<std::locale::facet, std::num_put<wchar_t> >::value), "");
32 static_assert((std::is_same<std::num_put<wchar_t>::char_type, wchar_t>::value), "");
33 static_assert((std::is_same<std::num_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), "");
34#endif
35
36 return 0;
37}
38

source code of libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/types.pass.cpp