开发者

How do you determine the signature of a boost::function type?

开发者 https://www.devze.com 2023-02-03 12:02 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消