This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11030] Cannot befriend a template specialization
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2003 21:03:01 -0000
- Subject: [Bug c++/11030] Cannot befriend a template specialization
- References: <20030529172554.11030.benxbli@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11030
giovannibajo at libero dot it changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at integrable-solutions
| |dot net
------- Additional Comments From giovannibajo at libero dot it 2003-06-22 21:03 -------
Gaby,
§14.5.3/1: "A friend of a class or class template can be [...] a specialization
of a function template or class template, [...]".
I think that the code is valid, even though I see that it actually gives a lot
of problems to the compiler, because it has to realize that the function
friendship is type-dependent (on the template parameter of A, since it matches
one of its specializations), so the access control should be postponed till A's
instantiation (due to two-stage name lookup).