1 // 5.3.4/19: If the lookup finds the two-parameter form of a usual
2 // deallocation function (3.7.4.2) and that function, considered as a
3 // placement deallocation function, would have been selected as a match for
4 // the allocation function, the program is ill-formed.
6 // But we should only complain about using op delete (void *, size_t) for
7 // placement delete if it would also be selected for normal delete, not if
8 // there's also an op delete (void *).
10 typedef __SIZE_TYPE__ size_t;
15 void* operator new (size_t, size_t);
16 void operator delete (void *, size_t); // { dg-error "non-placement" }
22 void * operator new (size_t);
23 void * operator new (size_t, size_t);
24 void operator delete (void *);
25 void operator delete (void *, size_t);
30 A* ap = new (24) A; // { dg-error "placement delete" }