why must a Boost.Asio handler be copy constructible?
问题 According to http://www.boost.org/doc/libs/1_61_0/doc/html/boost_asio/reference/Handler.html, a handler provided to io_service::post must be copy constructible. However, this excludes a scenario where a socket is accepted, and the response handler is moved, guaranteeing me that there is only one handler for the job: auto socket = std::make_unique<socket>(); accepter.accept(*socket); service.post([s{std::move(socket)}] { asio::write(*s, buffer("response"), ignored_err); }); So why is this copy