Briefly, range-for is the only algorithm C++11 actually wired into the language itself. (Herb Sutter)…