This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20669] New: Template candidates not listed in error message.
- From: "wwieser at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2005 17:20:41 -0000
- Subject: [Bug c++/20669] New: Template candidates not listed in error message.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiling the following (incorrect) code:
------------------------------<test.cc>--------------------------------
// Wolfgang Wieser, 03/2005
class A
{
template<typename T1>void B(int,T1) {}
void B(int,int) {}
};
void foo()
{
A a;
a.B(1,2,3);
}
-------------------------------------------------------------------
GCC (gcc (GCC) 4.1.0 20050312 (experimental)) will write the following error:
-------------------------------------------------------------------
// test.cc: In function 'void foo()':
// test.cc:12: error: no matching function for call to 'A::B(int, int, int)'
// test.cc:6: note: candidates are: void A::B(int, int)
-------------------------------------------------------------------
Everything is fine except that the template<T1> version of B() is not
listed among the candidates.
I think it's not a feature but a (low-prio) bug (?)
--
Summary: Template candidates not listed in error message.
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wwieser at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20669