Nate,
follow is filtered + transformed adaptor's internal behavior.
[filtered]
increment iterator behavior:
while (!pred(*it)) ++it;
dereference iterator behavior:
*it;
[transformed]
increment iterator behavior:
++it;
dereference iterator behavior:
f(*it);
[filtered | transformed]
increment iterator behavior:
while (!pred(*it)) ++it;
dereference iterator behavior:
f(*it);
[transformed | filtered]
increment iterator behavior:
while (!pred(f(*it))) ++it;
dereference iterator behavior:
f(*it);
oven::memoized is call once function by stored calculation.
2011/6/1 Nathan Ridge
Thanks Akira, it is good to know that there is a workaround.
But I was wondering, is it necessary in the first place for filtered to dereference the underlying range elements twice?
Thanks, Nate.