I\'m trying to use boost::asio and run into a bit of a quagmire.
I\'m trying to compile the following code:
std::unique_ptr buffer =
std::bind works fine with move-only types. However it creates a move-only functor in the process. std::function requires a copy constructible functor. It sounds like boost::asio does too.
When you call the move-only bind functor, it will pass its bound arguments as lvalues to the target operator(). So if one of your bound arguments is move-only, the target operator() must take that argument by (possibly const) lvalue reference.