Hi all:

It's common to see the following macros:

Code:
#define DEBUG_NEW new(__FILE__, __LINE__)
#define new DEBUG_NEW
and overloading operator new for debugging purposes.
It usually works but there is a problem when use operator new syntax in code instead of directly use new. I can change my code but i can't change third party's code. Something like this:

Code:
int* j = static_cast<int*>(::operator new(sizeof(int)));
It's not common, but it appears occassionally.
With that syntax, new macro generates compilation errors.
Is there any way to fix this problem?

Thanks in advance