aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto34.C
blob: 3682d60bf4bc465c76f9a37bd4016b6c4ebbf115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/51421
// { dg-do compile { target c++11 } }

int foo1(int);

void bar1()
{
  auto i = foo1(i);   // { dg-error "before deduction" }
}

struct A {};

A foo2(A);

void bar2()
{
  auto a = foo2(a);   // { dg-error "before deduction" }
}