This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13978] New: Koenig lookup doesn't find template functions.
- From: "mattyt-bugzilla at tpg dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 14:40:42 -0000
- Subject: [Bug c++/13978] New: Koenig lookup doesn't find template functions.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code:
namespace ns {
template <class TP> void func1(TP* t);
struct A {};
}
template < class TP >
void func2() {
func1( new ns::A() );
}
gives the error:
koenigmanage2.cc: In function `void func2()':
koenigmanage2.cc:9: error: cannot convert `ns::A*' to `TP*' in argument passing
on 3.4, but works on 3.3 and 3.2. In other words, Koenig lookup isn't finding
the template function in the associated namespace. It's my understanding this
should work.
--
Summary: Koenig lookup doesn't find template functions.
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mattyt-bugzilla at tpg dot com dot au
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13978