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]

friend definition in template crashes


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


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