This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15695] New: Instantiations of a template cannot be mutual friends?
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2004 01:21:41 -0000
- Subject: [Bug c++/15695] New: Instantiations of a template cannot be mutual friends?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
template<typename T> class A;
template<typename T> class A {
public:
template<typename R>
friend class A<R>;
};
int main() {
return 0;
}
gets:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc:6: error: partial specialization `A<R>' declared `friend'
Is this a bug, a hole in the language, or are you supposed to declare mutual friendship some other way?
Ivan
--
Summary: Instantiations of a template cannot be mutual friends?
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15695