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]

Internal error on egcs-2.91.29 19980517 with explicit class template functions


Hi,

I believe the following code should compile with and and without
-DBREAKME, it only compiles without -DBREAKME on egcs-2.91.29 19980517

#include <iostream>

void
print(const int& i)
{
	cerr << i << endl;	
}

template<class A>
class bar
{
public:	
	#ifdef BREAKME
	template<void (*B)(const A& a)>
	void doit(const A& a)
	#else
	void doit(const A& a, void (*B)(const A& a))
	#endif
	{
		B(a);
	}
};


int
main()
{
	bar<int>	b;
	
	#ifdef BREAKME
	b.template doit<print>(2);
	#else
	b.doit(2, print);
	#endif
}


Regards,

Niall


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