Hello, the following snippet does not resolve correctly in VAX on the Subtract call in _tmain
#include "stdafx.h"
class MyInterval
{
public:
MyInterval(int x, int y)
{ }
int Subtract()
{
return 0;
}
};
class MyThing
{
public:
MyThing(int x):m_x(x)
{}
MyInterval operator- (const MyThing& x) const
{
return MyInterval(this->m_x, x.m_x);
}
private:
int m_x;
};
int _tmain(int argc, _TCHAR* argv[])
{
MyThing thing1(5);
MyThing thing2(6);
int x = (thing2 - thing1).Subtract();
}
Typing (thing2 - thing1). brings up the members for class MyThing instead of MyInterval. The line
(thing2 - thing1).Subtract();
has subtract underlined in red. I'm using Visual Studio 2008 SP1 and VAX build 1840