OSDN Git Service

PR c++/37256
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / auto5.C
1 // Testcase for non-dependent auto in templates
2 // { dg-options "-std=c++0x" }
3
4 struct A
5 {
6   template<class> void f();
7 } a;
8
9 template <class T>
10 void g()
11 {
12   auto aa = a;
13   aa.f<int>();
14
15   auto p = new auto (a);
16   p->f<int>();
17 }
18
19 int main()
20 {
21   g<double>();
22 }