Skip to content

Commit 76f3bc0

Browse files
committed
Undo part of the change to task's await_transform
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.
1 parent c647836 commit 76f3bc0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

include/unifex/task.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,9 @@ struct _promise final {
377377
return unifex::await_transform(
378378
*this,
379379
with_scheduler_affinity(static_cast<Value&&>(value), this->sched_));
380-
} else if constexpr (std::is_invocable_v<
381-
tag_t<unifex::await_transform>,
382-
type&,
383-
Value>) {
380+
} else if constexpr (
381+
tag_invocable<tag_t<unifex::await_transform>, type&, Value> ||
382+
detail::_awaitable<Value>) {
384383
// await_transform has been customized so we can dispatch to the
385384
// await_transform CPO, then insert a transition back to the correct
386385
// execution context if necessary.

0 commit comments

Comments
 (0)