[Bug c++/15695] New: Instantiations of a template cannot be mutual friends?
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Fri May 28 18:07:00 GMT 2004
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
More information about the Gcc-bugs
mailing list