|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-04-28 08:31:02
"Sam Saariste" <ss_march2001_at_[hidden]> writes:
> I have used it for more than 6 months now and have added it to my standard
> set of idioms. Once you get into the FOREACH mindset, you don't only want to
> use it for std::for_each type jobs but you would also want to use it for
> std::transform type ones. In situations where you can use push_back on a
> result container, FOREACH serves this purpose as it is. However, I have
> encountered situations where this was not possible and where I wanted a
> second macro, say FOREACH2, that iterates over 2 ranges simultaneously. I
> have had such a need on more than one occasion. One situation was as above
> and in other situations I had to combine the elements of two ranges.
Try using zip_iterator with BOOST_FOREACH.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk