public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7863: Member function template argument deduction broken by declaration of name in different scope
@ 2002-09-13  9:22 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-09-13  9:22 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, timb

Synopsis: Member function template argument deduction broken by declaration of name in different scope

State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Sep 13 09:22:36 2002
State-Changed-Why:
    Confirmed.  Fixed in the main trunk (future GCC 3.3).

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7863


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/7863: Member function template argument deduction broken by declaration of name in different scope
@ 2002-09-09  6:36 timb
  0 siblings, 0 replies; 2+ messages in thread
From: timb @ 2002-09-09  6:36 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-13 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13  9:22 c++/7863: Member function template argument deduction broken by declaration of name in different scope lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2002-09-09  6:36 timb

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).