This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9411: Template function lookup problem (new parser)
- From: rguenth at tat dot physik dot uni-tuebingen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 22 Jan 2003 23:20:43 -0000
- Subject: c++/9411: Template function lookup problem (new parser)
- Reply-to: rguenth at tat dot physik dot uni-tuebingen dot de
>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: