asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Associators should support non-const get_executor() members.

Open chriskohlhoff opened this issue 10 years ago • 1 comments

Right now this does not work:

class foo
{
  typedef XYZ executor_type;
  executor_type get_executor() noexcept;
};

foo f;
get_associated_executor(f);

because get_associated_executor, and associated_executor<>::get() take the first argument by const reference. This isn't the intent, and currently prevents get_associated_executor(my_io_context) from compiling.

chriskohlhoff avatar Oct 21 '15 20:10 chriskohlhoff

This affects [async.reqmts.associator], [async.assoc.alloc.get], [async.assoc.exec.get], [async.assoc.alloc], and [async.assoc.exec].

chriskohlhoff avatar Oct 21 '15 21:10 chriskohlhoff