【发布时间】:2012-01-30 04:15:38
【问题描述】:
boost asio deadline_timer async_wait 函数采用以下形式的处理程序:
void handler(const boost::system::error_code& error)
我如何定义一个接受const boost::system::error_code& error 和int 类型参数的处理程序?
boost::asio::deadline_timer t(io_service);
t.async_wait(handler); //I need the async_wait to take in handler which accepts argument boost::system::error_code& error and an int
void handler(int, const boost::system::error_code& error )//extra int argument
谢谢。
【问题讨论】:
标签: c++ boost-asio