cmake/Tests/CompileFeatures/cxx_range_for.cpp

10 lines
127 B
C++
Raw Normal View History

2015-04-27 22:25:09 +02:00
void someFunc()
{
int accumulated = 0;
int numbers[] = { 1, 2, 5 };
2016-07-09 11:21:54 +02:00
for (int i : numbers) {
2015-04-27 22:25:09 +02:00
accumulated += i;
2016-07-09 11:21:54 +02:00
}
2015-04-27 22:25:09 +02:00
}