OSDN Git Service

* decl.c (cp_finish_decl): Use resolve_nondeduced_context for auto.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / auto20.C
1 // Test for proper non-deduced context handling of the initializer
2 // for an auto declaration/new.
3 // { dg-options -std=c++0x }
4
5 struct with_apply
6 {
7   template <unsigned>
8   void apply(const double&){}
9 };
10
11 auto p = &with_apply::apply<0>;
12 auto pp = new auto(&with_apply::apply<0>);
13
14 template <class T>
15 void f()
16 {
17   auto p = &T::template apply<0>;
18 }
19
20 template void f<with_apply>();