Use C++11 foreach instead of boost foreach.