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