It seems that boost::asio::placeholders cannot be used with std::bind . In the example you connected to, the first boost::bind call occurs in the following code:
resolver_.async_resolve(query, boost::bind(&client::handle_resolve, this, boost::asio::placeholders::error, boost::asio::placeholders::iterator));
Just replacing boost::bind with std::bind leads to a bunch of errors. To compile it, you need to replace boost::asio::placeholders with std::placeholders .
resolver_.async_resolve(query, std::bind(&client::handle_resolve, this, std::placeholders::_1, std::placeholders::_2));
Please note that I did not confirm that after making these changes, the code is functionally the same, only it compiles.
source share