From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24701 invoked by alias); 16 Oct 2002 22:29:30 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 24684 invoked from network); 16 Oct 2002 22:29:28 -0000 Received: from unknown (HELO localhost.localdomain) (66.60.148.227) by sources.redhat.com with SMTP; 16 Oct 2002 22:29:28 -0000 Received: from warlock.codesourcery.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id g9GMRFW02080; Wed, 16 Oct 2002 15:27:15 -0700 Date: Wed, 16 Oct 2002 16:40:00 -0000 From: Mark Mitchell To: Nathan Sidwell , "gcc@gcc.gnu.org" cc: "jason@redhat.com" , "gdr@codesourcery.com" Subject: Re: using decls and template methods Message-ID: <385620000.1034807235@warlock.codesourcery.com> In-Reply-To: <3DADCAE6.1000203@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-SW-Source: 2002-10/txt/msg01019.txt.bz2 --On Wednesday, October 16, 2002 09:24:06 PM +0100 Nathan Sidwell wrote: > Hi, > PR 7676 concerns the overloading of template methods of the form > struct A { > template void Foo (); > template void Foo (); > }; > we erroneously reject this. However, the relevent bit of cp/class.c also > deals with using decls. Consider > struct A { > template void Foo (); > }; > struct B : A { > template void Foo (); > using A::Foo; > }; > is A::Foo overridden or not? (and what if one is a template and the > other not?) I think that Foo is overloaded in B. (I assume you mean "overloaded" and not "overridden".) > [7.3.3]/12 says base functions with the same name and parameter types are > overridden. It does not mention 'and same template parameters'. > > [13.1]/2 does explicitly mention that the template parameters must also > be the same. (2nd bullet) Only if one of the functions is static; in this case neither is static. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com