21 Feb
2002
21 Feb
'02
10:51 p.m.
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.
This *is* a boost specific message! Try the filter_iterator_adaptor in the iterator_adaptors library. Cheers, George Heintzelman georgeh@aya.yale.edu