|
Boost : |
Subject: [boost] [asio] how to handle "boost::asio::placeholders::error" in "boost::function"?
From: ²ÜÑÇÎÄ (bobcyw_at_[hidden])
Date: 2010-04-26 07:39:56
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<void(void)> fun =
boost::bind(&transfor_file_push::write_file, this,
boost::asio::placeholders::error, conn);
}
{
//fine without placeholder
boost::system::error_code e;
boost::function<void(void)> fun =
boost::bind(&transfor_file_push::write_file, this, e, conn);
}
}
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk