Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/auto34.C

raw
1 // PR c++/51421
2 // { dg-do compile { target c++11 } }
3
4 int foo1(int);
5
6 void bar1()
7 {
8 auto i = foo1(i); // { dg-error "before deduction" }
9 }
10
11 struct A {};
12
13 A foo2(A);
14
15 void bar2()
16 {
17 auto a = foo2(a); // { dg-error "before deduction" }
18 }