Re: Member template internal compiler error
- From: Victor Bazarov <v.Abazarov@xxxxxxxxxxxx>
- Date: Thu, 02 Jun 2005 13:09:05 -0400
Kristo wrote:
I am getting an Internal Compiler Error in VC++ 6 with the following code. I'm fairly sure it is well-formed (g++ 3.4.2 compiles it fine). Is there a workaround available?
#include <iostream> #include <ostream>
class Foo { public: template <int N> static void Test() { std::cout << N << std::endl; } };
int main() { Foo::Test<5>(); /* I.C.E. here */ }
VC++ v6 is notoriously bad with templates. You'll be much better off when you upgrade to the later compiler (7.1 is currently shipping). For now, if you can, make this static member non-member but a simple free-standing function template.
V .
- References:
- Member template internal compiler error
- From: Kristo
- Member template internal compiler error
- Prev by Date: Member template internal compiler error
- Next by Date: Control X10 devices + a/v equipment with Bluetooth mobile phone
- Previous by thread: Member template internal compiler error
- Next by thread: Re: Member template internal compiler error
- Index(es):
Relevant Pages
|