
17 Feb
2006
17 Feb
'06
7:01 p.m.
On 2/17/06, Sebastian Redl
How about an indirect_iterator?
Or maybe a ptr_vector, so that your iterators are automatically indirect? lambda needs result deduction, which is hard, but you could always write your own simple dereferencing functor along the lines of the following: template <typename T> struct dereference_as { template <typename P> T &operator()(P ptr) { return *ptr; } } and then for_each( aVector.begin(), aVector.end(), bind(&myFunc, bind( dereference_as<A>(), _1) ) ); ~ Scott McMurray