[boost] [asio] how to handle "boost::asio::placeholders::error" in "boost::function"?
Hi all,
I met a problem which can't be solved. Can any kind people help me?
The code looks like the below:
class transfor_data
{
public:
void one_fun( const boost::system::error_code& e, connection conn )
{
...
}
void another_fun()
{
{
//compile error because of the placeholder
boost::function
//compile error because of the placeholder boost::function
fun = boost::bind(&transfor_file_push::write_file, this, boost::asio::placeholders::error, conn);
The signature of the resulting functor is not void(void), it's void(const boost::system::error_code &)
participants (2)
-
Igor R
-
曹亚文