Microsoft KB Archive/179271

= You receive an "INTERNAL COMPILER ERROR" error message when you implement more than one explicit instantiation of member template function =

Article ID: 179271

Article Last Modified on 9/30/2005

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q179271



SYMPTOMS
The error C1001 is produced when more than one explicit instantiation of member template function is implemented. The compiler generates the following error message:

test.cpp(14) : fatal error C1001: INTERNAL COMPILER ERROR

(compiler file 'msc1.cpp', line 1188)

Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information



CAUSE
Member template implementation is not supported in this product.



RESOLUTION
Do not use explicit instantiation for class member template functions.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

This problem was corrected in Microsoft Visual C++ .NET.



Steps to reproduce the behavior
The following sample code produces the error message described in the "Symptoms" section. // test.cpp class A { public: template  int getit(int i, T * it ) {    cout << "template getit\n" ; return i; } // explicit instantiations template int getit(int i, double * it);
 * 1) include 

template  int getit (int i, char * it);// C1001 error on this line };

Additional query words: ICE

Keywords: kberrmsg kbtshoot kbbug kbfix kbnoupdate kbtemplate kbcompiler KB179271

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.