In the following code I am getting the following warning
warning C4213: nonstandard extension used : cast on l-value
class X
{
public:
operator bool() {};
};
class Y
{
public:
bool b;
};
void main()
{
Y y;
X x;
y.b = x; // WARNING here
}
I can work around the problem by casting
y.b = (bool)x; // No Warning
If I declare local variable the warning disapear
bool b = x; // NO WARNING !
I am working with Visual Studio 6 SP 6.
What is going on here?
Thanks,
Miki Zilbershtein.