[Bug c++/35398] New: unable to take address of template function
joerg dot richter at pdv-fs dot de
gcc-bugzilla@gcc.gnu.org
Thu Feb 28 12:36:00 GMT 2008
template<int>
void foo()
{}
void test()
{
foo<1>(); // (1)
void (*func)() = foo<1>; // (2)
foo<1>; // (3)
void* d = (void*)foo<1>; // (4)
}
(1) and (2) are OK.
(3) fails with:
error: statement cannot resolve address of overloaded function
(4) fails with:
error: insufficient contextual information to determine type
--
Summary: unable to take address of template function
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joerg dot richter at pdv-fs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35398
More information about the Gcc-bugs
mailing list