Debian Codegraph @

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

raw
1 // Test for proper non-deduced context handling of the initializer
2 // for an auto declaration/new.
3 // { dg-do compile { target c++11 } }
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>();