B
Benedikt Weber
The following code gives an internal compiler error on VC++ .net 2003. It
compiles on Comeau online, so I guess its leagal code.
Can anybody confirm the error and report it to MS?
Benedikt
#include "stdafx.h"
class Parameter
{
public:
virtual operator int() const {throw "Error";}
virtual operator double() const {throw "Error";}
};
template<class T>
class Variable:
public Parameter
{
public:
virtual operator T() const;
};
int main()
{
Variable<double> v;
}
compiles on Comeau online, so I guess its leagal code.
Can anybody confirm the error and report it to MS?
Benedikt
#include "stdafx.h"
class Parameter
{
public:
virtual operator int() const {throw "Error";}
virtual operator double() const {throw "Error";}
};
template<class T>
class Variable:
public Parameter
{
public:
virtual operator T() const;
};
int main()
{
Variable<double> v;
}