How do you determine the signature of a boost::function type?
How can I determine the signature of boost::function?
In boost::signals2 there is a boost::signals2::signature_type type, but in boost::function - there isn't.
Example: http://liveworkspace.org/开发者_高级运维code/727a1e51cb829bab743d922bd7f1b03a
Thanks.
You can use boost::function<...>::result_type
and boost::function<...>::arg1_type
, boost::function<...>::arg2_type
etc...
See the reference page.
If you want the whole thing as a function-type, you can use the synthesizing features in Boost.FunctionTypes.
精彩评论