This one is for Boost experts. Are there any gotchas or details that the programmer needs to be aware of before he goes in and replaces all his old C/C++ style loops with the lean-and-mean-looking BOOST_FOREACH
?
(This question is partly derived from here.)
Take a look at:
BOOST_FOREACH - macro, I don't like macroses and prefer to use STL algorithms + lambda + bind.
Also C++0x will contain for-loop similar on BOOST_FOREACH:
int my_array[5] = {1, 2, 3, 4, 5}; for(int &x : my_array) { x *= 2; }
it is one additional reason for don't use partialy dead BOOST_FOREACH.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With