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, class OutputIterator = ostreambuf_iterator<CharT> > 13// class money_put 14// : public locale::facet 15// { 16// public: 17// typedef CharT char_type; 18// typedef OutputIterator iter_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::money_put<char> >::value), ""); 27 static_assert((std::is_base_of<std::locale::facet, std::money_put<wchar_t> >::value), ""); 28 static_assert((std::is_same<std::money_put<char>::char_type, char>::value), ""); 29 static_assert((std::is_same<std::money_put<wchar_t>::char_type, wchar_t>::value), ""); 30 static_assert((std::is_same<std::money_put<char>::iter_type, std::ostreambuf_iterator<char> >::value), ""); 31 static_assert((std::is_same<std::money_put<wchar_t>::iter_type, std::ostreambuf_iterator<wchar_t> >::value), ""); 32 static_assert((std::is_same<std::money_put<char>::string_type, std::string>::value), ""); 33 static_assert((std::is_same<std::money_put<wchar_t>::string_type, std::wstring>::value), ""); 34} 35