
21 May
2006
21 May
'06
7:18 a.m.
Hi Eric, Here's an idea for a macro to complement BOOST_FORACH. Use example: BOOST_ITER_FOREACH( i, get_range() ) { std::cout << *i; } It shoul be quite easy to generate a for-loop behind the scene. The motivation for having this macro would be that often you actually need access to the iterator because it provides much more details than the value-type, eg. - the base-iterator - index etc. With the upcoming range adaptors, the creation of ranges/iterators of unknown type could be much more common. -Thoorsten