Template, fatal error C1001: INTERNAL COMPILER ERROR

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This gives me a fatal error.
I'm using .NET VC7.1 and made a win32 consol app, I have no problems with
VC6. Debug build.

I have removed nearly all my code this is whats left. From the beginning the
template was defined in a .h file, but that has no effect, same error.

I have seen when searching for fatal error that there are some problems with
templates and optimization, but nothing as simple like this. I'm i doing
something wrong?

#include "stdafx.h"
namespace _DKEYLST
{

template <class Type>
class CMListNode
{
public:
int DeleteNode();
};

};

namespace _DKEYLST
{
template <class Type>
CMListNode<Type>::DeleteNode()
{
return 0;
}
};

class CMyClass
{
public:
CMyClass(){}
};

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

c:\temp\arun\arun\arun.cpp(27) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information
 
Itjalve said:
#include "stdafx.h"
namespace _DKEYLST
{

template <class Type>
class CMListNode
{
public:
int DeleteNode();
};

};

namespace _DKEYLST
{
template <class Type>
CMListNode<Type>::DeleteNode()

should be

int CMListNode said:
{
return 0;
}
};

class CMyClass
{
public:
CMyClass(){}
};

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

-cd
 
Thank you!

Carl Daniel said:
Itjalve said:
#include "stdafx.h"
namespace _DKEYLST
{

template <class Type>
class CMListNode
{
public:
int DeleteNode();
};

};

namespace _DKEYLST
{
template <class Type>
CMListNode<Type>::DeleteNode()

should be

int CMListNode said:
{
return 0;
}
};

class CMyClass
{
public:
CMyClass(){}
};

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

-cd
 
Back
Top