Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-05-21 03:18:33

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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at