Article ID: 155164
Article Last Modified on 12/1/2003
/* Compile options needed: none
*/
struct Test
{
} ;
// Uncomment the following 2 lines for workaround #1
// namespace Space2
// {
int Tester(const Test& rx, const Test& ry)
{
return 0 ;
}
int operator!=(const Test& rx, const Test& ry)
{
return 0 ;
}
// Uncomment the following line for workaround #1
// }
namespace Space1
{
int operator!=(const float& rx, const Test& rt)
{
return 1 ;
}
int Tester(const float& rx, const int& ri)
{
return 1 ;
}
}
// Uncomment the following line for workaround #2
// using namespace Space1 ;
void main()
{
const Test a ;
const Test b ;
using namespace Space1 ;
if (a != b) ; // This line causes the C2678
Tester(a, b); // This line causes the C2664
}
Keywords: kbbug kbfix kbprogramming kbcompiler KB155164