Boost logo

Boost :

From: Rainer Deyke (rainerd_at_[hidden])
Date: 2004-05-07 22:55:38


David Abrahams wrote:
> Err, this could only work if you were willing to pass the loop block
> to the macro. Might be worth the pain, though (?)

If you are willing to pass the loop body to the macro, you don't need the
inner for loop at all.

for (C::iterator s = c.begin(), f = c.end(); s != f; ++s)
{
    C::reference r = *s;
    // Body goes here
}

-- 
Rainer Deyke - rainerd_at_[hidden] - http://eldwood.com

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