ICE with template function pointer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Drew (dam_nospam_at_esrd.com)
Date: 02/13/04


Date: Fri, 13 Feb 2004 15:44:34 -0600

VS.NET 2003 V7.1.3088 - Unmanaged code

I'm getting:

c:\Proj\pt.h(581) : 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

Pseudo code:

template <class T> class Vec2
{
protected:
    T n[2];
public:
    Vec2() { n[0] = n[1] = 0; }
};

template <class T> class Pt2 : public Vec2<T>
{
public:
    Pt2() {}

    static void (*circfcn)( T x, T y, T rad);
};

// Chokes here:
template <class T> void (*Pt2<T>::circfcn)( T x, T y, T rad);

Any fix/workaround?

Thanks,
Drew

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 2/12/2004


Relevant Pages

  • Re: LINK : fatal error LNK1104
    ... INTERNAL COMPILER ERROR ... Please choose the Technical Support command on the Visual C++ ...
    (microsoft.public.vc.ide_general)
  • Re: fatal error LNK1104
    ... INTERNAL COMPILER ERROR ... Please choose the Technical Support command on the Visual C++ ...
    (microsoft.public.vstudio.general)
  • BUG in VC7.1: typedef name and forward declaration cause ICE
    ... t4.cpp: fatal error C1001: INTERNAL COMPILER ERROR ... (compiler file 'msc1.cpp', line 2701) ... or open the Technical Support help file for more information ...
    (microsoft.public.vc.language)
  • Internal compiler error, VC++ 6
    ... I get the following error message when compiling (without any hint which ... Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Error executing cl.exe. ...
    (microsoft.public.vc.language)
  • Re: Internal compiler error, VC++ 6
    ... Please choose the Technical Support command on the Visual C++ ... or open the Technical Support help file for more ...
    (microsoft.public.vc.language)