summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/auto20.C
blob: 90f875114a0fed638f139c96067bd5d0ca03ee39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test for proper non-deduced context handling of the initializer
// for an auto declaration/new.
// { dg-options -std=c++0x }

struct with_apply
{
  template <unsigned>
  void apply(const double&){}
};

auto p = &with_apply::apply<0>;
auto pp = new auto(&with_apply::apply<0>);

template <class T>
void f()
{
  auto p = &T::template apply<0>;
}

template void f<with_apply>();