Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-09-13 13:07:57


Stuart Dootson <stuart.dootson_at_[hidden]> writes:

> I think you'll need to use something like:
>
> for(filter_itr f(i.begin(), i.end()); f != filter_itr(i.end()); ++f)

Or use make_filter_iterator.

> filter_iterator doesn't have an assignment operator,

Whoa there, it certainly does! All iterators are required to support
assignment. It doesn't have an implicit conversion from the
underlying iterator type, though, which rules out using copy
initialization from anything other than another filter_iterator.

> you have to go through the relevant constructor (see
> http://www.boost.org/libs/iterator/doc/filter_iterator.html#filter-iterator-synopsis)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net