#include <iostream>
using namespace std;
struct A
{
void * operator new [] (size_t t, int, int)
{
cout << "3 parameters allocation" << endl;
return ::operator new[](t);
}
void operator delete [] (void *p, int, int)
{
cout << "3 parameters deallocation" << endl;
return ::operator delete[](p);
}
};
int main()
{
A *a = new (5,5) A[10];
delete [] a;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IEEKewoJdm9pZCAqIG9wZXJhdG9yIG5ldyBbXSAoc2l6ZV90IHQsIGludCwgaW50KQoJewoJCWNvdXQgPDwgIjMgcGFyYW1ldGVycyBhbGxvY2F0aW9uIiA8PCBlbmRsOwoJCXJldHVybiA6Om9wZXJhdG9yIG5ld1tdKHQpOwoJfQoJCgl2b2lkIG9wZXJhdG9yIGRlbGV0ZSBbXSAodm9pZCAqcCwgaW50LCBpbnQpCgl7CgkJY291dCA8PCAiMyBwYXJhbWV0ZXJzIGRlYWxsb2NhdGlvbiIgPDwgZW5kbDsKCQlyZXR1cm4gOjpvcGVyYXRvciBkZWxldGVbXShwKTsKCX0KfTsKCmludCBtYWluKCkgCnsKCUEgKmEgPSBuZXcgKDUsNSkgQVsxMF07CglkZWxldGUgW10gYTsKfQ==