This is a range based for loop, it has the same basic behavior of:
for(auto it = deviceList.begin(); it != deviceList.end(); ++it)
{
const auto& ioDev = *it;
}
The range based for loop has quickly become one of my favorite constructs, it's terse and when you need to iterate an entire range, works as well (and as efficiently) as possible.
If you need the other constructs of a typical for loop (say to exit early in some case), then range-based for isn't for that use case.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…