CMake/Tests/CompileFeatures/cxx_range_for.cpp

10 lines
127 B
C++

void someFunc()
{
int accumulated = 0;
int numbers[] = { 1, 2, 5 };
for (int i : numbers) {
accumulated += i;
}
}