D
dirk
Why doesn't the standard allow to overload operator new/delete in my
namespace, e.g.
namespace Foo
{
void* operator new( std::size_t sz );
void operator delete( void* address );
}
On the other hand I can overload new/delete per class:
class Foo1
{
static void* operator new( std::size_t sz );
static void operator delete( void* address );
};
And finally what happens if I have classes A and B that overwrite new
and delete and a class C that now inherits from both. What is the
expected behaviour there?
Cheers,
-Dirk
namespace, e.g.
namespace Foo
{
void* operator new( std::size_t sz );
void operator delete( void* address );
}
On the other hand I can overload new/delete per class:
class Foo1
{
static void* operator new( std::size_t sz );
static void operator delete( void* address );
};
And finally what happens if I have classes A and B that overwrite new
and delete and a class C that now inherits from both. What is the
expected behaviour there?
Cheers,
-Dirk