Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-02 09:40:28


Neal D. Becker wrote:

>>> #define FOR_EACH(var, container) \
>>> for(typeof(container.begin()) _for_each_i = container.begin(),\
>>> _for_each_e = container.end();\
>>> _for_each_i != _for_each_e; ++_for_each_i)\
>>> if(bool _for_each_continue = false) {}\
>>> else\
>>> for(var = *_for_each_i; !_for_each_continue;
>>> _for_each_continue=true)
>>>
>>> which works perfectly for me.
>>
>>
>>
>
> Why not use boost::range? Then boost::begin(container)...

Because:

  * the above works for me
  * boost.range is not in sandbox <hint>

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk