repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
dtor3.C
blob
8eb887e27c21277d7467f5efa32993765c0a391d
1
// { dg-do assemble }
2
// PRMS Id: 5341
3
// Bug: g++ complains about the explicit destructor notation.
4
5
#include <stddef.h>
6
7
void *operator new(size_t Size, void* pThing) { return pThing; }
8
9
template <class T> class Stack {
10
public:
11
Stack() { new (Data) T(); }
12
~Stack() { ((T*)Data)->~T(); }
13
private:
14
char Data[sizeof(T)];
15
};
16
17
Stack<int> a;
18
Stack<Stack<int> > c;