The code below doesn't compile under gcc-4.2.1 on a i686-pc-linux-gnu
template <class T> void foo(T);
void bar()
{
&foo<int>;
}
The compiler returns the following error message:
teste.cpp: In function void bar():
teste.cpp:4: error: statement cannot resolve address of overloaded function
As we're specifying a complete template function specialization, its address
should be returned correctly, and there's no overloaded function in scope,
there's nothing to resolve.
--
Summary: Cannot specialize template function with address
operator
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rodolfo at rodsoft dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33005