$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Using single-pass ranges.
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2012-07-24 06:04:15
I have a class that hands out a sequence of Things through a
getNextThing() interface, ie.,
struct Thing { };
struct ThingFeed
{
Thing * getNextThing( );
};
returning null when there's no more things. I'd like to be
able to feed this into the Boost range-based algorithms, something
like
boost::for_each( thingFeedProxy | filter( someCondition ), doSomething );
But it's not clear to me how or if I can represent my ThingFeed as a range.
Any thoughts or advice appreciated.
Thx, Rob