3#include <scl/feature/concepts/executor.h>
4#include <scl/feature/concepts/wrapper.h>
5#include <scl/feature/detail/executor_access.h>
6#include <scl/feature/detail/wrapper_constructor_resolver.h>
7#include <scl/feature/detail/wrapper_constructors.h>
9#include <scl/utility/attribute.h>
13namespace scl::feature::detail
16 template <
typename Value,
template <
typename>
class Executor>
17 requires ::scl::feature::concepts::executor<Executor<Value>>
19 :
public ::scl::feature::reflect<wrapper<Value, Executor>, Executor<Value>, wrapper<Value, Executor>>
20 ,
public ::scl::feature::reflect_operators<wrapper<Value, Executor>, Executor<Value>>
22 using self_type = wrapper<Value, Executor>;
25 using value_type = Value;
26 using executor_type = Executor<value_type>;
30 executor_type m_executor;
32 friend struct executor_access;
36 template <
typename... Args>
37 constexpr explicit wrapper(Args &&... args)
38 : m_executor{::std::forward<Args>(args)...}
45 SCL_WRAPPER_CONSTRUCTOR_FOR_SELF
47 SCL_WRAPPER_CONSTRUCTOR_FOR_OTHER
48 SCL_WRAPPER_ASSIGNMENT_FOR_SELF
49 SCL_WRAPPER_ASSIGNMENT_FOR_OTHER
60template <
typename Value,
template <
typename>
class Executor>
63 template <
typename Self>
64 static constexpr decltype(
auto) executor(Self && self)
noexcept
66 return ::scl::feature::detail::executor_access::get(::std::forward<Self>(self));
79 template <
typename Wrapper,
typename Executor,
typename QualifiedInner,
template <
typename>
class OuterExecutor>
80 requires(::scl::feature::concepts::wrapper<QualifiedInner> &&
81 !::std::same_as<QualifiedInner, ::std::remove_cvref_t<QualifiedInner>>)
82 class reflect<Wrapper, Executor, detail::wrapper<QualifiedInner, OuterExecutor>>
83 : public
reflect<Wrapper, Executor, detail::
wrapper<::std::remove_cvref_t<QualifiedInner>, OuterExecutor>>
91 template <
typename Wrapper,
typename Executor,
typename Value,
template <
typename>
class OuterExecutor>
93 :
public reflect<Wrapper, Executor, Value>
Primary (terminal) template for the reflection mixin chain.
Definition reflect.h:76
Composable proxy wrapper that delegates to Value through executors.
Definition wrapper.h:72
constexpr wrapper()
Default construction — default-initialises the executor.
#define SCL_REFLECT_TYPE(type, executor)
Declares the wrapper and executor types for use by SCL_REFLECT_METHOD.
Definition type.h:27
Namespace of the ScL Feature module.
Primary template for the reflection mixin chain.
Trait that provides access to the executor inside a wrapper.
Definition executor.h:39