summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/cpp0x/auto20.C
blob: 8561b3d4a8a2b443bbccc2475c8813d1d7905e70 (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++11 }

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>();
OpenPOWER on IntegriCloud