Boost logo

Boost Users :

Subject: Re: [Boost-users] [result_of] Simple question
From: niXman (i.nixman_at_[hidden])
Date: 2011-10-07 04:06:09


Better solution:
http://www.boost.org/doc/libs/1_47_0/libs/function_types/doc/html/boost_functiontypes/reference/decomposition.html#boost_functiontypes.reference.decomposition.result_type

2011/10/7 Julien Nitard <julien.nitard_at_[hidden]>:
> Hello,
>
>> Doesn't Boost.Function support 'result_of', or am I missing something
>> obvious?
>
> More the opposite, result_of doesn't support boost::function and is quite
> limited without "recent" compiler features.
>
>>typedef boost::result_of<my_function_type>::type my_return_type;
>
> You may want to use "#define BOOST_RESULT_OF_USE_DECLTYPE" if your compiler
> is recent enough.
> Explanations in the docs of result_of.
> Of course if your compiler is even more recent, it may support
> std::result_of.
>
> Regards,
>
> Julien
>
>
> PS: niXman solution will work even better if you don't have too many
> functions...
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net