Hi,
the following yields an internal compiler error with VC7.1
struct Nix
{
template<class T> operator T()const
{
return T();
}
};
class IncompleteType;
void f(IncompleteType const&)
{}
int main(int argc, char* argv[])
{
f(Nix());//fatal error C1001: INTERNER COMPILERFEHLER (Compilerdatei
'msc1.cpp', Zeile 2701)
return 0;
}
Note that VC2005 produces a proper diagnostic in this situation:
error C2664: 'f' : cannot convert parameter 1 from 'Nix' to 'const
IncompleteType &' Reason: cannot convert from 'Nix' to 'const
IncompleteType' Source or target has incomplete type
Regards,
Arne