http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49609

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-01 
16:19:27 UTC ---
The C++ standard lists the contexts in which an overloaded function name can be
used without arguments, and reinterpret_cast is not one of them.

Based on that, I would think G++ 4.4 was correct to reject the code.  I note
that clang++ gives the same behaviour as G++ 4.7 (accepts the code but does not
instantiate the function template)

You can make it work by using an explicit type conversion to the correct type
before doing the reinterpret_cast:

void *(*my_function_ptr)(void*, void *)
 = reinterpret_cast<void*(*)(void*,void*)>(
    (void*(*)(float*,float*))&(value_convert_function<float, float>) );

Reply via email to