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 // <streambuf> 11 12 // template <class charT, class traits = char_traits<charT> > 13 // class basic_streambuf 14 // { 15 // public: 16 // // types: 17 // typedef charT char_type; 18 // typedef traits traits_type; 19 // typedef typename traits_type::int_type int_type; 20 // typedef typename traits_type::pos_type pos_type; 21 // typedef typename traits_type::off_type off_type; 22 23 #include <streambuf> 24 #include <type_traits> 25 26 int main() 27 { 28 static_assert((std::is_same<std::streambuf::char_type, char>::value), ""); 29 static_assert((std::is_same<std::streambuf::traits_type, std::char_traits<char> >::value), ""); 30 static_assert((std::is_same<std::streambuf::int_type, std::char_traits<char>::int_type>::value), ""); 31 static_assert((std::is_same<std::streambuf::pos_type, std::char_traits<char>::pos_type>::value), ""); 32 static_assert((std::is_same<std::streambuf::off_type, std::char_traits<char>::off_type>::value), ""); 33 34 static_assert((std::is_same<std::wstreambuf::char_type, wchar_t>::value), ""); 35 static_assert((std::is_same<std::wstreambuf::traits_type, std::char_traits<wchar_t> >::value), ""); 36 static_assert((std::is_same<std::wstreambuf::int_type, std::char_traits<wchar_t>::int_type>::value), ""); 37 static_assert((std::is_same<std::wstreambuf::pos_type, std::char_traits<wchar_t>::pos_type>::value), ""); 38 static_assert((std::is_same<std::wstreambuf::off_type, std::char_traits<wchar_t>::off_type>::value), ""); 39 } 40