This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Pointer to member function trouble
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Pointer to member function trouble
- From: Jens Maurer <jmaurer at menuett dot rhein-main dot de>
- Date: Sun, 11 Apr 1999 21:54:59 +0200
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);
}