Iros
 
Loading...
Searching...
No Matches
stopped_as_optional.h
Go to the documentation of this file.
1#pragma once
2
12
13namespace di::execution {
16 template<concepts::Sender Send>
18 auto operator()(Send&& sender) const -> concepts::Sender auto {
19 return execution::let_value(get_env(), [sender = util::forward<Send>(sender)]<typename E>(E const&)
21 {
24 execution::then(util::move(sender),
25 []<typename T>(T&& value) {
26 return Opt(util::forward<T>(value));
27 }),
28 [] {
29 return execution::just(Opt());
30 });
31 });
32 }
33 };
34}
35
37}
Definition optional_forward_declaration.h:5
Definition sender.h:11
Definition single_sender.h:8
Definition stopped_as_optional.h:14
Definition bulk.h:30
constexpr auto let_value
Definition let.h:208
constexpr auto then
A sender that maps values into another value.
Definition then.h:276
constexpr auto get_env
Definition get_env.h:27
constexpr auto stopped_as_optional
Definition stopped_as_optional.h:36
constexpr auto let_stopped
Definition let.h:210
constexpr auto just
Definition just.h:86
Definition stopped_as_optional.h:15