Iros
 
Loading...
Searching...
No Matches
any_receiver.h
Go to the documentation of this file.
1#pragma once
2
8#include "di/any/types/this.h"
15#include "di/meta/algorithm.h"
16#include "di/meta/core.h"
17#include "di/meta/language.h"
18#include "di/meta/operations.h"
20
21namespace di::execution {
22namespace detail {
23 template<concepts::CompletionSignature Sig>
27
28 template<concepts::ValidCompletionSignatures Sigs>
29 using AnySigs =
32
33 template<concepts::ValidCompletionSignatures Sigs, typename Env>
36}
37
38template<typename Sigs, typename Env, typename Storage, typename VTablePolicy>
40 class Type : public Any<detail::AnyReceiverMethods<Sigs, Env>, Storage, VTablePolicy> {
41 private:
42 using Base = Any<detail::AnyReceiverMethods<Sigs, Env>, Storage, VTablePolicy>;
43
44 public:
45 using is_receiver = void;
46
47 Type(Type const&) = delete;
48 auto operator=(Type const&) -> Type& = delete;
49
50 Type(Type&&) = default;
51 auto operator=(Type&&) -> Type& = default;
52
53 template<typename R, typename T = meta::RemoveCVRef<R>>
56 Type(R&& receiver) : Base(util::forward<R>(receiver)) {}
57 };
58};
59
60template<concepts::ValidCompletionSignatures Sigs, typename Env = void,
61 concepts::AnyStorage Storage = any::InlineStorage<2 * sizeof(void*), alignof(void*)>,
62 typename VTablePolicy = any::MaybeInlineVTable<3>>
64}
65
66namespace di {
68}
void is_receiver
Definition any_receiver.h:45
Type(R &&receiver)
Definition any_receiver.h:56
auto operator=(Type &&) -> Type &=default
auto operator=(Type const &) -> Type &=delete
Definition any_storable_infallibly.h:11
Definition any_storage.h:11
Definition operations.h:11
Definition operations.h:114
Definition receiver_of.h:25
Definition valid_completion_signatures.h:8
meta::Type< AnyT< UserInterface, Storage, VTablePolicy > > Any
Definition any.h:294
Definition read.h:70
meta::AsTemplate< types::CompletionSignatures, meta::PushFront< meta::PushFront< meta::AsList< Sigs >, SetError(vocab::Error)>, SetStopped()> > AnySigs
Definition any_receiver.h:29
types::Method< meta::LanguageFunctionReturn< Sig >, meta::AsLanguageFunction< void, meta::PushFront< meta::AsList< Sig >, types::This && > > > MethodForSig
Definition any_receiver.h:24
InterfaceWithEnv< meta::Transform< meta::Unique< meta::AsList< AnySigs< Sigs > > >, meta::Quote< MethodForSig > >, Env > AnyReceiverMethods
Definition any_receiver.h:34
Definition bulk.h:30
meta::Conditional< concepts::LanguageVoid< Env >, Interface, meta::MergeInterfaces< Interface, meta::List< types::Method< types::Tag< execution::get_env >, Env(types::This const &)> > > > InterfaceWithEnv
Definition any_env.h:14
meta::Type< AnyReceiverT< Sigs, Env, Storage, VTablePolicy > > AnyReceiver
Definition any_receiver.h:63
T::Type Type
Definition core.h:26
Type< detail::AsTemplateHelper< Template, T > > AsTemplate
Definition algorithm.h:60
Concat< List< T >, L > PushFront
Definition algorithm.h:83
Type< detail::AsLanguageFunction< R, T > > AsLanguageFunction
Definition algorithm.h:31
StatusCode< Erased< long > > Error
Definition error.h:8
Definition zstring_parser.h:9
Definition inline_storage.h:30
Definition maybe_inline_vtable.h:9
Definition any_receiver.h:39
Definition set_error.h:6
Definition set_stopped.h:6
Definition function.h:30
Definition completion_signuatures.h:7
Definition method.h:7
Definition this.h:4