1 // Copyright Neil Groves 2010. Use, modification and
2 // distribution is subject to the Boost Software License, Version
3 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
7 // For more information, see http://www.boost.org/libs/range/
9 #ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
10 #define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
13 * \file istream_range.hpp
18 #include <boost/config.hpp>
19 #include <boost/range/iterator_range.hpp>
25 template<class Type, class Elem, class Traits> inline
26 iterator_range<std::istream_iterator<Type, Elem, Traits> >
27 istream_range(std::basic_istream<Elem, Traits>& in)
29 return iterator_range<std::istream_iterator<Type, Elem, Traits> >(
30 std::istream_iterator<Type, Elem, Traits>(in),
31 std::istream_iterator<Type, Elem, Traits>());
34 using range::istream_range;
37 #endif // include guard