Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/range/istream_range.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
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) | |
5 // | |
6 // | |
7 // For more information, see http://www.boost.org/libs/range/ | |
8 // | |
9 #ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED | |
10 #define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED | |
11 | |
12 /*! | |
13 * \file istream_range.hpp | |
14 */ | |
15 | |
16 #include <iterator> | |
17 #include <iosfwd> | |
18 #include <boost/config.hpp> | |
19 #include <boost/range/iterator_range.hpp> | |
20 | |
21 namespace boost | |
22 { | |
23 namespace range | |
24 { | |
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) | |
28 { | |
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>()); | |
32 } | |
33 } // namespace range | |
34 using range::istream_range; | |
35 } // namespace boost | |
36 | |
37 #endif // include guard |