handler_ptr gives the strong exception guarantee (API Change):

* The handler_ptr constructor now provides the
  strong exception guarantee.

* The signature for managed objects constructed by
  `handler_ptr` receives a const reference to the handler.

Actions required:

* Change the constructor signature for state objects
  used with handler_ptr to receive a const reference to
  the handler.
This commit is contained in:
Damian Jarek
2017-12-04 13:02:31 -08:00
committed by Vinnie Falco
parent e08132106e
commit 285965d82e
11 changed files with 81 additions and 41 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class echo_op
// contained object constructor is a reference to the
// managed final completion handler.
//
explicit state(Handler& handler, AsyncStream& stream_)
explicit state(Handler const& handler, AsyncStream& stream_)
: stream(stream_)
, buffer((std::numeric_limits<std::size_t>::max)(),
boost::asio::get_associated_allocator(handler))