Boost logo

Boost :

Subject: Re: [boost] [asio] how to handle "boost::asio::placeholders::error" in "boost::function"?
From: Michael Caisse (boost_at_[hidden])
Date: 2010-04-26 13:04:46

> {
> //compile error because of the placeholder
> boost::function<void(void)> fun =
> boost::bind(&transfor_file_push::write_file, this,
> boost::asio::placeholders::error, conn);
> }

You have an error because the function signature you have indicated with
boost::function is void yet you are binding two parameters. You probably
want something like:

  boost::function< void<boost::system::error_code&, connection> fun


Michael Caisse
Object Modeling Designs

Boost list run by bdawes at, gregod at, cpdaniel at, john at