c++11 - range based for loop (tidy)