friend definition in template crashes
Ian Haggard
ian@shellus.com
Wed Feb 25 23:50:00 GMT 1998
The following code gives both egcs 1.0 and gcc 2.8.0 on Solaris 2.5.1 an
internal compiler error number 243:
template <int dim>
struct B {
friend void f(const B& b) {}
};
template<class T,int dim>
struct A {
void g(B<dim> b);
};
class Any {};
A<Any,3> instantiater;
The workaround is to instantiate B<3> before I instantiate A<Any,3>.
--
Ian Haggard || ian@shellus.com (work) || IanHaggard@juno.com (home)
GNU/Linux -- "Oh, no, Mr Bill!" || #define employer_opinion !my_opinion
More information about the Gcc-bugs
mailing list