From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4521 invoked by alias); 18 Jan 2008 21:13:28 -0000 Received: (qmail 4512 invoked by uid 22791); 18 Jan 2008 21:13:28 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.181) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jan 2008 21:12:57 +0000 Received: by wa-out-1112.google.com with SMTP id m16so1968061waf.20 for ; Fri, 18 Jan 2008 13:12:55 -0800 (PST) Received: by 10.114.76.1 with SMTP id y1mr1190963waa.38.1200690775852; Fri, 18 Jan 2008 13:12:55 -0800 (PST) Received: by 10.114.144.5 with HTTP; Fri, 18 Jan 2008 13:12:55 -0800 (PST) Message-ID: <4348dea50801181312l4fef5134t2e3f65d3a28f1102@mail.gmail.com> Date: Sat, 19 Jan 2008 08:21:00 -0000 From: "Jonathan Wakely" To: "Dragan Milenkovic" Subject: Re: A simple sample code involving templates, friends and lookup Cc: gcc@gcc.gnu.org In-Reply-To: <479085C0.8070601@plusplus.co.yu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> <479085C0.8070601@plusplus.co.yu> 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/msg00298.txt.bz2 On 18/01/2008, Dragan Milenkovic wrote: > > 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 Aha, yes ... but strangely that seems to have been closed as Not-A-Defect for a long time: the templates book is newer and says the standard isn't clear. If the standard does clearly say an instantiation is required, GCC should accept the code even without "weird" being declared, because the call should cause an instantiation, and declare "func" I'm ignoring the fact that func is only declared in your example, not defined - to call it there must be a definition between the declaration and point of instantiation - but turning the friend declaration into a definition doesn't change GCC's behaviour. I wonder why EDG rejects it . > Hey... the current number of issues is kinda scary... :-O Everyone has issues, even C++ :) Jon