Actually, asio::placeholders::error
is equivalent to _1
Boost.Bind placeholder, so bind(&my_class::handler, this, asio::placeholders::error)
is just like bind(&my_class::handler, this, _1)
.
When this handler is being called by Boost.Asio completion-handler dispatcher, error_code
is passed as the 1st argument to this function.
However, you can always bind
a function that expects less arguments (in this case - zero) - when the binder gets invoked, any extra arguments are silently ignored.