470,874 Members | 1,752 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,874 developers. It's quick & easy.

VC7.1 internal compiler error with incomplete type

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
Feb 18 '06 #1
0 918

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Matthew Del Buono | last post: by
5 posts views Thread by Lou Pecora | last post: by
1 post views Thread by Ayende Rahien | last post: by
4 posts views Thread by David Sworder | last post: by
2 posts views Thread by Vasco Lohrenscheit | last post: by
29 posts views Thread by Ark | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.