Iros
 
Loading...
Searching...
No Matches
async_open.h
Go to the documentation of this file.
1#pragma once
2
10
11namespace di::execution {
12namespace async_open_ns {
13 struct Function {
14 template<concepts::Scheduler Sched, typename... ExtraArgs>
15 requires(concepts::TagInvocable<Function, Sched, ExtraArgs...>)
16 auto operator()(Sched&& sched, ExtraArgs&&... extra_args) const {
17 static_assert(
19 "async_open() customizations must return a deferred di::AsyncResource instance.");
20 return tag_invoke(*this, util::forward<Sched>(sched), util::forward<ExtraArgs>(extra_args)...);
21 }
22 };
23}
24
25constexpr inline auto async_open = async_open_ns::Function {};
26}
Checks that a type model AsyncResource.
Definition run.h:50
Definition scheduler.h:21
Definition tag_invoke.h:33
Definition async_open.h:12
Definition bulk.h:30
constexpr auto async_open
Definition async_open.h:25
decltype(di::function::tag_invoke(util::declval< Tag >(), util::declval< Args >()...)) TagInvokeResult
Definition tag_invoke.h:40
decltype(function::detail::invoke_impl(util::declval< Ts >()...)) InvokeResult
Definition invoke.h:64
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22
Definition async_open.h:13