Boost logo

Boost :

From: Russell Hind (rh_gmane_at_[hidden])
Date: 2005-05-03 02:36:28


Dave Harris wrote:
>
> No, I meant what I wrote. I usually have a suitable iterator typedef in
> scope. In the worst case it is more like:
>
> typedef vector<ArbitrarilyComplexType> MyVec;
> for (MyVec::iterator i = vec.begin(); i != vec.end(); ++i)
> cout << *i;
>

But we sometimes have containers of boost::shared_ptr which then requires

(*i)->

to access.

BOOST_FOREACH simplifies these cases.

Cheers

Russell


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