This list form of a for loop has been part of the language starting with the 2011 standard. It is technically called a range-based for loop, but most often referred to as a foreach loop. You will probably recognize it from the similar loop in Java.
Java's foreach loop can run through objects in Java's collections framework. C++ has a similar feature which we'll get to later, and the foreach loop works fine with that. But it also works with plain arrays, and with bracketed lists as shown here.