This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11030] Cannot befriend a template specialization


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]