aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto5.C
blob: 8ed66d1ea36aa6bd40d60f747dfcf81d1f864da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Testcase for non-dependent auto in templates
// { dg-do compile { target c++11 } }

struct A
{
  template<class> void f();
} a;

template <class T>
void g()
{
  auto aa = a;
  aa.f<int>();

  auto p = new auto (a);
  p->f<int>();
}

int main()
{
  g<double>();
}