[Range] boost::begin() & end( ) for istream?

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? - Thanks, Rob.

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

On Wed, Oct 1, 2008 at 9:22 PM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
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.
Ah, yes - I see istream_range.hpp in the download in the vault, but it's a zero-length file! Am I looking at the latest available code for this? - Rob.

Rob, I'm afraid you are. There are two omissions counted_range and istream_range. I will implement them to a point that they pass all tests and work on all of my test configurations within a week. Apologies for the incompleteness. It absolutely should have been in there already, and is frankly a rather embarrassing mistake. Regard, Neil Groves On Thu, Oct 2, 2008 at 9:43 AM, Robert Jones <robertgbjones@gmail.com>wrote:
On Wed, Oct 1, 2008 at 9:22 PM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
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.
Ah, yes - I see istream_range.hpp in the download in the vault, but it's a zero-length file! Am I looking at the latest available code for this?
- Rob. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Thu, Oct 2, 2008 at 10:34 AM, Robert Jones <robertgbjones@gmail.com>wrote:
On Thu, Oct 2, 2008 at 10:21 AM, Neil Groves <neil@grovescomputing.com> wrote:
I will implement them to a point that they pass all tests and work on all
of
my test configurations within a week.
Ok Neil, that would be great - many thanks.
Hi Neil Did this happen? I can't see any vault updates, but I'm never completely sure I'm looking in the right place. - Rob.
participants (3)
-
Neil Groves
-
Robert Jones
-
Thorsten Ottosen