//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template , // class Distance = ptrdiff_t> // class istream_iterator // : public iterator // { // public: // typedef charT char_type; // typedef traits traits_type; // typedef basic_istream istream_type; // ... // // If T is a literal type, then the default constructor shall be a constexpr constructor. // If T is a literal type, then this constructor shall be a trivial copy constructor. // If T is a literal type, then this destructor shall be a trivial destructor. #include #include #include int main() { typedef std::istream_iterator I1; static_assert((std::is_convertible >::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); static_assert( std::is_trivially_copy_constructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); typedef std::istream_iterator I2; static_assert((std::is_convertible >::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); static_assert( std::is_trivially_copy_constructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); typedef std::istream_iterator I3; static_assert(!std::is_trivially_copy_constructible::value, ""); static_assert(!std::is_trivially_destructible::value, ""); }