aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/pseudodtor5.C
blob: 751e662ad3164c1845a5616421d6a4af90c3bdd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/37563

struct A {};

template<int> struct Traits
{
  typedef void X;
};

template<> struct Traits<0>
{
  typedef A X;
};

template<int N> struct B
{
  typedef typename Traits<N>::X Y;

  void foo(Y y)
  {
    y.Y::A::~A();
  }
};