S
saadsj
Hello,
I'm in a situation where I'm using a library object that happens to
have a bug in one of its operators. This bug was recently introduced
into a new release of their library. Unfortunately, the option of
reverting back to the previous, working version of the library is not
possible. For discussion purposes, the bug is as follows:
namespace System
{
inline bool operator !=( int inLeft, const Variant& inRight )
{
// While this is not the actual bug... it's pretty close.
return false;
}
}
As you can see the "!=" operator always returns false.
So here it goes... I have no clue if this is possible with some C++
magic so please forgive me if the idea sounds fantasy like or down
right stupid. I would like to somehow overload the library's
implementation of this != operator without having to modify their
source. Then I could put my implementation in a "global" header file
that every file in my project already includes.
If anyone has ideas on how this can be done, your help would be greatly
appreciated. Again, if this question is ridiculous please be gentle.
Best regards,
Scott
I'm in a situation where I'm using a library object that happens to
have a bug in one of its operators. This bug was recently introduced
into a new release of their library. Unfortunately, the option of
reverting back to the previous, working version of the library is not
possible. For discussion purposes, the bug is as follows:
namespace System
{
inline bool operator !=( int inLeft, const Variant& inRight )
{
// While this is not the actual bug... it's pretty close.
return false;
}
}
As you can see the "!=" operator always returns false.
So here it goes... I have no clue if this is possible with some C++
magic so please forgive me if the idea sounds fantasy like or down
right stupid. I would like to somehow overload the library's
implementation of this != operator without having to modify their
source. Then I could put my implementation in a "global" header file
that every file in my project already includes.
If anyone has ideas on how this can be done, your help would be greatly
appreciated. Again, if this question is ridiculous please be gentle.
Best regards,
Scott