This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with combination of namespaces, templates, and friends
- To: staley at t7 dot lanl dot gov
- Subject: Re: Problem with combination of namespaces, templates, and friends
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 30 Mar 2000 06:54:28 +0200
- CC: gcc-bugs at gcc dot gnu dot org, staley at datil dot lanl dot gov
- References: <20000329202223.A6933@datil.lanl.gov>
> I browsed around on http://gcc.gnu.org/ and on the gcc/g++ info pages
> but couldn't find any mention of this bug (feature?).
Thanks for your bug report. It's a known bug, and it is difficult to
fix. The work-around is to declare the entire template as a friend:
namespace A {
template<class T>
struct thing {
template<class U>
friend void B::fun(const thing &);
};
}
Regards,
Martin