This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: I can't get my friends to work
- To: David Alan Gilbert <dg at cogency dot co dot uk>
- Subject: Re: I can't get my friends to work
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 30 Oct 1997 16:09:35 -0200
- Cc: egcs-bugs at cygnus dot com
- References: <3458C84A.86F15633@cogency.co.uk>
David Alan Gilbert writes:
> ll keeps its list of ll_elements and I want all the functions in 'll'
> to be friendly with ll_element so that ll methods can get to the next
> pointer in ll_element.
Make sure you declar all templates before referring to them:
template <typename content> class ll;
template <tyepname content> class ll_iter;
template <typename content> class ll_element;
And then you declare
> template<class content> ll_element {
^^ class keyword missing
> friend ll<content>;
> friend ll_iter<content>;
^^ I'd advise you to add class keywords here to, but I'm not
sure these are required.
> }
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil