[Bug c++/13978] New: Koenig lookup doesn't find template functions.
mattyt-bugzilla at tpg dot com dot au
gcc-bugzilla@gcc.gnu.org
Mon Feb 2 14:40:00 GMT 2004
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
More information about the Gcc-bugs
mailing list