From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19034 invoked by alias); 18 Jan 2008 10:53:41 -0000 Received: (qmail 19025 invoked by uid 22791); 18 Jan 2008 10:53:41 -0000 X-Spam-Check-By: sourceware.org Received: from plusplus.gw.tehnicom.net (HELO leon.plusplus.co.yu) (62.193.142.214) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jan 2008 10:53:10 +0000 Received: from [192.168.11.8] (adsl-ppp-0094.yubc.net [212.124.170.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by leon.plusplus.co.yu (Postfix) with ESMTP id DC3EA7B854; Fri, 18 Jan 2008 11:53:06 +0100 (CET) Message-ID: <479085C0.8070601@plusplus.co.yu> Date: Fri, 18 Jan 2008 14:17:00 -0000 From: Dragan Milenkovic User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: Jonathan Wakely Cc: gcc@gcc.gnu.org Subject: Re: A simple sample code involving templates, friends and lookup References: <478F3175.2050809@plusplus.co.yu> <84fc9c000801170449j332abd0bp501bbc2fd9d04c46@mail.gmail.com> <478F544F.9060509@plusplus.co.yu> <84fc9c000801170535k1bd3eb89p6f95d63ee6f58647@mail.gmail.com> <84fc9c000801170911p199d1913i796e92bba9a17cb7@mail.gmail.com> <84fc9c000801171333xf405eecxd91c4d43b335af44@mail.gmail.com> <4348dea50801171713o61db948cu698b97fba1faaab2@mail.gmail.com> In-Reply-To: <4348dea50801171713o61db948cu698b97fba1faaab2@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00293.txt.bz2 Jonathan Wakely wrote: > On 17/01/2008, Richard Guenther wrote: >> Well, a language lawyer can probably clear things up. From a look >> at the std it looks like w/o a previous declaration the above should >> be invalid. And at a different point it suggests the decl becomes >> available. > > Yes, at the point of instantiation of Foo the friend is declared, > and can then be found by ADL because Foo is an associated type. > The reference parameter 'x' doesn't cause an instantiation, only 'weird' does. > > However, see the discussion in section 9.2.2 of Vandevoorde and > Josuttis' C++ Templates book and the footnote saying the standard > isn't exactly clear. [snip] Thanks for clarification and info. I believe issue #34 addresses exactly what we're talking about. http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#34 Hey... the current number of issues is kinda scary... :-O Dragan