blob: 733a6e22cb9b9b2a14718931c7775c90021e417c (
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
|
// { dg-do run }
// Origin: Alexander Schiemann (aschiem@count.math.uni-sb.de)
typedef __SIZE_TYPE__ size_t;
int i;
struct B{};
struct A{
static void* operator new(size_t)
{return &i;}
inline static void operator delete(void*p);
static void operator delete(void*, const B&){}
};
inline void A::operator delete(void*p)
{A::operator delete(p,B());}
int main()
{A *ap=new A;
delete ap;}
|