Boost logo

Boost :

Subject: Re: [boost] AlRangeExandrescu?
From: Scott McMurray ([hidden])
Date: 2009-07-24 20:43:01

2009/7/24 Stewart, Robert <Robert.Stewart_at_[hidden]>:
> How about another try: traversing a range with changing criteria?
> A particular range class can take a predicate or some other
> traversal influencing argument that can change with each
> advance.  How would you express that with iterator pairs?

At worst, it seems like you could always define a range_iterator<R>
that holds a shared_ptr<R> and just forward to the range operations,
with a null shared_ptr representing the "end" iterator. I agree it's
inefficient, but I don't think that ranges can represent anything that
iterators cannot (given sufficient contortion).

Boost list run by bdawes at, gregod at, cpdaniel at, john at