
"Sam Saariste" <ss_march2001@pobox.com> 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