chriskohlhoff / asio-tr2

C++ TR2 proposal based on Asio
17 stars 5 forks source link

Associators should support non-const get_executor() members. #226

Open chriskohlhoff opened 8 years ago

chriskohlhoff commented 8 years ago

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 commented 8 years ago

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