summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/dtor6.C
blob: c44b780294c21f9b189fd2b03ed0c0d97a028cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/40139

template<int> struct A
{
  static int i;
};

template<int N> int A<N>::i = { A::~A }; // { dg-error "non-static member function" }

template class A<0>;

struct X { };

int i1 = X::~X;			// { dg-error "non-static member function" }
int i2 = &X::~X;		// { dg-error "address of destructor" }
int i3 = &A<0>::~A;		// { dg-error "address of destructor" }