New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
istream_range.hpp in vendors/XIOS/current/extern/boost/include/boost/range – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/range/istream_range.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 1.1 KB
Line 
1// Boost.Range library
2//
3// Copyright Neil Groves 2008. Use, modification and
4// distribution is subject to the Boost Software Licence, Version
5// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt
7//
8// For more information, see http://www.boost.org/libs/range
9//
10
11#ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
12#define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
13
14/*!
15 * \file istream_range.hpp
16 */
17
18#include <iterator>
19#include <istream>
20#include <boost/config.hpp>
21#include <boost/range/iterator_range.hpp>
22
23namespace boost
24{
25    namespace range
26    {
27        template<class Type, class Elem, class Traits> inline
28            iterator_range<std::istream_iterator<Type, Elem, Traits> >
29        istream_range(std::basic_istream<Elem, Traits>& in)
30        {
31            return iterator_range<std::istream_iterator<Type, Elem, Traits> >(
32                std::istream_iterator<Type>(in),
33                std::istream_iterator<Type>());
34        }
35    } // namespace range
36    using range::istream_range;
37} // namespace boost
38
39#endif // include guard
Note: See TracBrowser for help on using the repository browser.