public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9411: Template function lookup problem (new parser)
@ 2003-01-22 23:26 rguenth
  0 siblings, 0 replies; only message in thread
From: rguenth @ 2003-01-22 23:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9411
>Category:       c++
>Synopsis:       Template function lookup problem (new parser)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 22 23:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Richard Guenther
>Release:        g++ (GCC) 3.4 20030122 (experimental)
>Organization:
>Environment:
ix86-linux
>Description:
The testcase below fails with

~/ix86/gcc3.4/bin/g++ -c parser3.cpp -Wall
parser3.cpp: In function `void bar(const D&) [with D = int]':
parser3.cpp:14:   instantiated from here
parser3.cpp:9: error: no matching function for call to `Evaluator::foo(const 
   int&)'

if not explicitly specifying the <D>, it works. Earlier
g++ are fine, so is intel icpc in -ansi mode.


struct Evaluator {
        template <class B>
        void foo(const B&);
};

template <class D>
void bar(const D& d)
{
        Evaluator().foo<D>(d);
}

void foobar()
{
        bar(1);
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-22 23:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-22 23:26 c++/9411: Template function lookup problem (new parser) rguenth

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