
21 Apr
2004
21 Apr
'04
1:39 p.m.
John Torjo <john.lists@torjo.com> writes:
You can also use the rtl (Ranges Template Library): (note: I'll rename the library, wince there's another one with the same name ;))
for( crange<container> r(cont); r; ++r) *r += 2;
p.s. no macros involved in the above statement ;) Best, John
That said, you do have have to name the container type. At the same time, you don't have to name the element type ;-) You could get rid of the container type if you recall any_pointer idea. But
David Abrahams wrote: this monster is too slow to be an iterator :) -- Alexander Nasonov Independent Developer and Consultant