projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
re PR c++/54430 ([C++11] For-Loop: Scope of iterating variable begins too early)
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
range-for30.C
1
// PR c++/54430
2
// { dg-require-effective-target c++11 }
3
4
struct A
5
{
6
A(int) {}
7
int* begin() {return nullptr;}
8
int* end() {return nullptr;}
9
};
10
11
int main()
12
{
13
int i[] = { 1, 2, 3, 4 };
14
for (int i : i);
15
for (auto i : i);
16
for (A v : v); // { dg-error "not declared in this scope" }
17
}