Tidy up composed operation doc

fix #1141
This commit is contained in:
Vinnie Falco
2018-05-29 15:33:55 -07:00
parent f5def127d8
commit 5b1022d63e
2 changed files with 9 additions and 9 deletions

View File

@ -4,6 +4,7 @@ Version 172:
* Fix move-only arguments in bind_handler
* Fix http::parser constructor javadoc
* Tidy up test::stream javadocs
* Tidy up composed operation doc
--------------------------------------------------------------------------------

View File

@ -103,15 +103,14 @@ in this style:
[example_core_echo_op_4]
Next is to implement the function call operator. Our strategy is to make our
composed object meet the requirements of a completion handler by being copyable
(also movable), and by providing the function call operator with the correct
signature. Rather than using `std::bind` or `boost::bind`, which destroys
the type information and therefore breaks the allocation and invocation
hooks, we will simply pass `std::move(*this)` as the completion handler
parameter for any operations that we initiate. For the move to work correctly,
care must be taken to ensure that no access to data members are made after the
move takes place. Here is the implementation of the function call operator for
this echo operation:
composed object meet the requirements of a completion handler by being movable,
and by providing the function call operator with the correct signature. Rather
than using `std::bind` or `boost::bind`, which destroys the type information
and therefore breaks the allocation and invocation hooks, we will simply pass
`std::move(*this)` as the completion handler parameter for any operations that
we initiate. For the move to work correctly, care must be taken to ensure that
no access to data members are made after the move takes place. Here is the
implementation of the function call operator for this echo operation:
[example_core_echo_op_5]