From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8515 invoked by alias); 9 Sep 2002 13:36:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8497 invoked by uid 71); 9 Sep 2002 13:36:03 -0000 Resent-Date: 9 Sep 2002 13:36:03 -0000 Resent-Message-ID: <20020909133603.8495.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, timb@bluearc.com Received: (qmail 7989 invoked by uid 61); 9 Sep 2002 13:33:30 -0000 Message-Id: <20020909133330.7988.qmail@sources.redhat.com> Date: Mon, 09 Sep 2002 06:36:00 -0000 From: timb@bluearc.com Reply-To: timb@bluearc.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7863: Member function template argument deduction broken by declaration of name in different scope X-SW-Source: 2002-09/txt/msg00134.txt.bz2 List-Id: >Number: 7863 >Category: c++ >Synopsis: Member function template argument deduction broken by declaration of name in different scope >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Sep 09 06:36:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: timb@bluearc.com >Release: 3.2 >Organization: >Environment: Debian GNU/Linux x86 unstable >Description: Attempting to compile the code below gets the error message "no matching function for call to `A::Foo(int&)'" even though A::Foo would clearly match. Strangely, the problem goes away if the declaration of struct X::Foo is removed, or if the return type of A::Foo<> is changed so it does not involve the template parameter. >How-To-Repeat: namespace X { struct Foo; } struct A { template static T& Foo(T p); }; void bar() { int i; A::Foo(i); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: