Subject: Re: [boost] AlRangeExandrescu?
From: Scott McMurray (me22.ca+boost_at_[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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk