Pointer to member function trouble
Jens Maurer
jmaurer@menuett.rhein-main.de
Sun Apr 11 12:55: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 am trying to use pointers to member functions as template
value parameters, which produces "Internal compiler error".
Thanks,
Jens Maurer
Demonstration program:
template<class T, void (T::*f)()>
class C { };
template<class T>
C<T, &T::output> call(T& obj)
{ // Internal compiler error at this line
return C<T, &T::output>();
}
class Test {
public:
void output();
};
void sub()
{
Test t;
call(t);
}
More information about the Gcc-bugs
mailing list