aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/dtor4.C
blob: f23ab78256038c1c5af38dccb588a2140df34f51 (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
// Build don't link:

struct S1 {
  ~S1(); // ERROR - candidate
};

S1::~S1() const
{ // ERROR - prototype does not match 
}


struct S2 {
  ~S2() volatile; // ERROR - destructors may not be volatile
};


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

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


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