M
Mark P
Consider a class in which I redefine operator new(std::size_t):
struct A
{
void* operator new(std::size_t size) {/* my implementation */}
};
This has the consequence of hiding the placement version of operator new:
void* operator new(std::size_t size, void* location);
I can deal with this by defining placement new within A to call the
global placement new:
void* operator new(std::size_t size, void* location)
{
return :perator new(size,loc);
}
Is this the recommended way to handle this situation? Is it possible to
achieve the same effect by some sort of using declaration?
Thanks,
Mark
struct A
{
void* operator new(std::size_t size) {/* my implementation */}
};
This has the consequence of hiding the placement version of operator new:
void* operator new(std::size_t size, void* location);
I can deal with this by defining placement new within A to call the
global placement new:
void* operator new(std::size_t size, void* location)
{
return :perator new(size,loc);
}
Is this the recommended way to handle this situation? Is it possible to
achieve the same effect by some sort of using declaration?
Thanks,
Mark