This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Pointer to member function trouble


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);
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]