summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
blob: a4db38ba7077f9511d8392e08030a35ceed749d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-do assemble  }

struct S1 {
  ~S1(); // { dg-error "" } candidate
};

S1::~S1() const // { dg-error "" } prototype does not match 
{
}


struct S2 {
  ~S2() volatile; // { dg-error "" } destructors may not be volatile
};


template <class T>
struct S3 {
  ~S3(); // { dg-error "" } candidate
};

template <class T>
S3<T>::~S3() volatile  // { dg-error "" } prototype does not match 
{
}


template <class T>
struct S4 {
  ~S4() const; // { dg-error "" } destructors may not be const
};