19980530 ICE - templates

Niall Smart njs3@doc.ic.ac.uk
Fri Jun 5 10:15:00 GMT 1998


Hi,

[njs3@pingu ~]$ g++ -v
Reading specs from
/tmp/egcs-19980531/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.34/specs
gcc version egcs-2.91.34 19980530 (gcc2 ss-980502 experimental)
[njs3@pingu ~]$ g++ bug.cc
bug2.cc: In function `int main()':
bug2.cc:22: Internal compiler error.
bug2.cc:22: Please submit a full bug report to `egcs-bugs@cygnus.com'.


class test
{
public:
	void foo(const int& i);
};


template<class T, class R, class A>
class C
{
public:
	C(T* obj, R (T::*mem)(const A& a), const A& a);
};


int
main()
{
	test	t;
	void	(test::*m)(const int&) = &test::foo;

	C(&t, m, 2);
}


Please CC me on any replies,

Regards,

Niall



More information about the Gcc-bugs mailing list