Példa

class A{
public:
static void * operator new(size_t size, newhandler nh);
};

class B{
public:
static void * operator new(size_t size, newhandler nh);
};


Megoldás
Biztosítson alapértelmezett értékeket minden extra paraméterhez, vagy határozza meg a 'new' alapértelmezett formátumát is.

class A{
public:
static void * operator new(size_t size, newhandler n
h=0);
};


class B{
public:
static void * operator new(size_t size, newhandler nh);
static void * operator new(size_t size){
return ::operator new(size);
}
};