Boost Users :
From: Colin Fox (cfox_at_[hidden])
Date: 2002-02-21 17:44:57
This isn't a boost specific message per se, I guess, but I thought
someone here may know the answer.
I have a list<> of smart_ptrs. Some of the elements in the list are
ready for processing under various circumstances.
What I'd like would be a custom iterator that when I say "++i" it checks
the element to see if it's ready, and if not, advance to the next, and
so on until it finds a ready element. If it doesn't find one, then i ==
list.end(). This would simulate having a list that contained only ready
elements, without having to have multiple lists.
I have a number of books on C++, but I can't figure out from them how to
create a custom iterator.
Can anyone help?
-- Colin Fox CF Consulting Inc. cfox_at_[hidden]
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