static member function templates

Jens Maurer jmaurer@menuett.rhein-main.de
Sun Apr 11 13:00:00 GMT 1999


Hello,

I'm using a rather recent anon-CVS checkout of egcs:

gcc version egcs-2.93.14 19990401 (gcc2 ss-980929 experimental)

on Linux 2.0.29 (libc5).

I'm trying to use explicit template instantiation of a static
member function, but this gives an "Internal compiler error".

Thanks,
Jens Maurer


class C
{
	void (*f)();
        template<class T> static void call();

public:
	template<class T> C(T t) : f(&call<T>) { }
		// Internal compiler error
};


class Test
{ };

int main()
{
	C(Test());
}



More information about the Gcc-bugs mailing list