mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57:31 +02:00
@ -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
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -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]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user