public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: timb@bluearc.com To: gcc-gnats@gcc.gnu.org Subject: c++/7863: Member function template argument deduction broken by declaration of name in different scope Date: Mon, 09 Sep 2002 06:36:00 -0000 [thread overview] Message-ID: <20020909133330.7988.qmail@sources.redhat.com> (raw) >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<int> 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<class T> static T& Foo(T p); }; void bar() { int i; A::Foo(i); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-09-09 13:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-09 6:36 timb [this message] 2002-09-13 9:22 lerdsuwa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020909133330.7988.qmail@sources.redhat.com \ --to=timb@bluearc.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).