Topic: Template friends of template classes


Author: Branko Cibej <branko.cibej@hermes.si>
Date: 1997/06/09
Raw View
I'd be grateful if someone could explain how a template class can have
nested template friends.

Given the following pair of templates:

    template<typename T1> class A {
        template<typename T2> class B { };

        // template<...> friend class B<...> ??
    };

How can I make all specializations of template A::B friends of A<T1>? I've
searched the December 96 draft (11.4, 14.5.3 and 14.6.5) and it seems it
can't be done at all. Would anybody know the correct syntax for the friend
declaration?
--
Branko Cibej   <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
phone: (++386 61) 186 53 49  fax: (++386 61) 186 52 70
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]