Suppose I have a class with overloaded operator new
.
class Class {
public:
void* operator new( size_t );
void operator delete( void* );
};
Will objects of that class always be allocated with the overloaded operator new
when I use new Class()
or is it possible that the default operator new
is used when new Class()
construct appears in code?