From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8696 invoked by alias); 16 Oct 2002 20:24:11 -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 8683 invoked from network); 16 Oct 2002 20:24:10 -0000 Received: from unknown (HELO uha.cs.bris.ac.uk) (62.30.75.143) by sources.redhat.com with SMTP; 16 Oct 2002 20:24:10 -0000 Received: from codesourcery.com (localhost.localdomain [127.0.0.1]) by uha.cs.bris.ac.uk (8.11.6/8.11.6) with ESMTP id g9GKO7g03354; Wed, 16 Oct 2002 21:24:08 +0100 Message-ID: <3DADCAE6.1000203@codesourcery.com> Date: Wed, 16 Oct 2002 14:13:00 -0000 From: Nathan Sidwell Organization: Codesourcery LLC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gcc@gcc.gnu.org CC: mark@codesourcery.com, jason@redhat.com, gdr@codesourcery.com Subject: using decls and template methods Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00997.txt.bz2 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?) [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) nathan -- Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC 'But that's a lie.' - 'Yes it is. What's your point?' nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org