FIX: C1001 on Template Class of Type Pointer to Function (142787)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q142787 SYMPTOMS
When instantiating a template class of type pointer to function and then
using it as demonstrated in the sample code in the Samples section of this
article, you may see the following internal compiler error:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 899)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information
RESOLUTION
The syntax for instantiating a template class of type pointer to function
is:
TS<void (*)(float)> pf ;
where TS is the name of class template, and pf is the name of the template
class being instantiated. You can now instantiate objects of type pf and
use them to call functions that accept a float as an argument and return
void.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++
version 5.0.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbbug kbCompiler kbfix kbVC500fix KB142787 |
---|
|