开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜