Fw: Function pointers, result_of<> and function_traits<>

This post to boost-users describes what sounds like a bug in result_of. Delfin Rojas wrote:
Hello all,
I am trying to get the return type of a member function given its signature. Consider the following example from the boost result_of test:
struct X {};
int main { using namespace boost; typedef int (X::*mem_func_ptr)(float);
BOOST_STATIC_ASSERT((is_same<result_of<mem_func_ptr(X,char)>::type, int>::value)); }
This test compiles/runs with no problems. Now, what I want is the return type of a function with signature "int (X::*)()"
I added the following to the test:
typedef int (X::*empty_mem_func_ptr)();
BOOST_STATIC_ASSERT((is_same<result_of<empty_mem_func_ptr(X)>::type, int>::value));
This does not compile. I get an error boost_1_32_0\boost\utility\result_of.hpp(43) : error C2825: 'F::template': cannot form a qualified name.
I tried to do this same thing with function_traits but it seems function traits does not support member function pointers at all.
So this is all I have. If somebody can help me I would appreciate it.
Thanks
-delfin
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (1)
-
Peter Dimov