Commit 2957ffe
committed
asioexec::completion_token: Lvalue Completion Handler Invocation
As added by 35a3e31 the completion
handler type used by the implementation of asioexec::completion_token
only supported rvalue-qualified invocation. This was due to the fact:
- Invocation of a completion handler is consumptive in the same way that
calling set_value, set_error, or set_stopped on a receiver is (note
those three operations require an rvalue-qualified operand), and
- Asio has invoked completion handlers with rvalue qualification since
1.20.0 (standalone)/1.77 (Boost)
Unfortunately there are operations in the wild which do not rvalue
qualify their completion handlers when invoking them. For example the
operations provided by Boost.Beast (at least as of this writing).
Updated asioexec::completion_token to support the above-described
operations by removing the rvalue qualification from the function call
operator of its completion handler type.1 parent cc8e3aa commit 2957ffe
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
721 | 732 | | |
0 commit comments