This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29615] Class can't be friends of itself?
- From: "potswa at mac dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2010 21:08:43 -0000
- Subject: [Bug c++/29615] Class can't be friends of itself?
- References: <bug-29615-13480@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from potswa at mac dot com 2010-03-26 21:08 -------
The error doesn't occur if the friend is a template instance, so it really
doesn't hurt anyone. But it's weird.
template< int z >
class F {
friend class F<0>; // error only if <0> removed
};
template class F<0>;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29615