How can I store a boost::bind object as a class member?

前端 未结 4 1956
甜味超标
甜味超标 2020-12-21 00:45

I\'m writing an application that uses boost::asio. Asio\'s async_receive (or async_read) is invariably shown using a boost::bind

4条回答
  •  隐瞒了意图╮
    2020-12-21 01:03

    The "standard" way of doing this is to make functor be a std::function.

    If you really want to store the actual binder object, then look at compile error messages involving the binder to figure out the exact type, and try using those to determine the actual type of the binder object.

提交回复
热议问题