This is the mail archive of the gcc@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]

Re: A simple sample code involving templates, friends and lookup


On 18/01/2008, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> Yes, at the point of instantiation of Foo<int> the friend is declared,
> and can then be found by ADL because Foo<int> is an associated type.
> The reference parameter 'x' doesn't cause an instantiation, only 'weird' does.

Forgot the reference - this is 14.6.5 [temp.inject]

DR387 fixes some errors in the example, but doesn't change the wording.
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#387

Jon


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