This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal error on egcs-2.91.29 19980517 with explicit class template functions
- To: egcs-bugs at cygnus dot com
- Subject: Internal error on egcs-2.91.29 19980517 with explicit class template functions
- From: njs3 at doc dot ic dot ac dot uk (Niall Smart)
- Date: Sat, 23 May 1998 17:32:05 +0100
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