Skip to content

Commit

Permalink
Undo part of the change to task's await_transform
Browse files Browse the repository at this point in the history
PR #628 means that asking "is `unifex::await_transform` invocable on
this awaited thing?" always returns "yes" so this change reverts to
asking "has this awaited thing customized `await_transform` or is it
naturally awaitable?" like we used to.
  • Loading branch information
ispeters committed Aug 29, 2024
1 parent c647836 commit 76f3bc0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/unifex/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,9 @@ struct _promise final {
return unifex::await_transform(
*this,
with_scheduler_affinity(static_cast<Value&&>(value), this->sched_));
} else if constexpr (std::is_invocable_v<
tag_t<unifex::await_transform>,
type&,
Value>) {
} else if constexpr (
tag_invocable<tag_t<unifex::await_transform>, type&, Value> ||
detail::_awaitable<Value>) {
// await_transform has been customized so we can dispatch to the
// await_transform CPO, then insert a transition back to the correct
// execution context if necessary.
Expand Down

0 comments on commit 76f3bc0

Please sign in to comment.