repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
range-for1.C
blob
4fecdc71540bde06dbd2aa4e7041a2fd07cbdaa4
1
// Test for range-based for loop
2
// Test the loop with an array
3
4
// { dg-do run { target c++11 } }
5
6
extern "C" void abort();
7
8
int main()
9
{
10
int a[] = {1,2,3,4};
11
int sum = 0;
12
for (int x : a)
13
sum += x;
14
if (sum != 10)
15
abort();
16
}