|
Boost : |
Subject: Re: [boost] [Range] boost::begin() & end( ) for istream?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-10-01 16:22:46
Robert Jones skrev:
> Is there any mechanism to have the boost.range algorithms
> iterate over a stream?
>
> Given
>
> typedef std::istream_iterator<int> in;
>
> std::for_each(
> in(std::cin), in(), std::cout << (_1 * 3) << " " );
>
> can I write this using range algorithms?
I expect the range_ex library in the review queue will provide
istream_range<T> etc. Maybe it is already there in the files section.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk