]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/range-for30.C
PR c++/92590 - wrong handling of inherited default ctor.
[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 }
This page took 0.038615 seconds and 5 git commands to generate.