Yeah, for_each is a great idea and if you don't have C++'s complicated reference / copy object model it works very well. But it's not as nice as an actual for loop.
Thanks for the feedback, I am going to update the example in the readme. The point was that boost::histogram plays nicely with the C++ stdlib algorithms, but that seems to be distracting.