
Eric Niebler wrote:
This is true, but I'm not convinced. What value BOOST_FOREACH has comes primarily from its ability to simplify something that's already pretty darn simple -- a plain for(;;) loop. I strongly resist any effort to make BOOST_FOREACH more complicated, unless the wins are truly significant. In this case, I don't think they are.
Thanks:) It's one of my pet peeves. How about when someone uses BOOST_FOREACH when they don't really mean foreach and intend to break out of the loop and use an internal variable outside the loop. It gets more complicated then if they'd written their own loop. BOOST_FOREACH does one thing and does it well, please leave it alone, and please don't use it when it's not what you want. If you're having to jump through hoops to make it work, it's not the right tool;) JM2C;) Patrick