-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customize get_return_address for as_sender (#629)
* Customize get_return_address for as_sender This change customizes `unifex::get_return_address()` for the `as_sender` adapter that makes awaitables connectable. ``` void foo(auto someAwaitable) { auto s = unifex::as_sender(std::move(someAwaitable)); // now returns the call-site of as_sender, which is probably the call // to as_sender in foo (but might be the call to foo if foo is // inlined), rather than the result of // unifex::_get_return_address::default_return_address() auto rtnAdr = unifex::get_return_address(s); } ``` * Replace manual casts with forward<>() and move() Replace C-style and `static_cast` casts with the appropriate `std:forward<>()` or `std::move()`.
- Loading branch information
Showing
1 changed file
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters