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 move-only arguments in bind_handler
* Fix http::parser constructor javadoc * Fix http::parser constructor javadoc
* Tidy up test::stream javadocs * Tidy up test::stream javadocs
* Tidy up composed operation doc
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

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