"ScL Feature"/
ScL Feature 0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
Loading...
Searching...
No Matches
scl::feature::concepts::executor Concept Reference

Satisfied when Type implements the executor interface. More...

#include <executor.h>

Concept definition

template<typename Type>
Satisfied when Type implements the executor interface.
Definition executor.h:40
constexpr bool is_executor_v
true if Type satisfies the executor interface.
Definition executor.h:170

Detailed Description

Satisfied when Type implements the executor interface.

An executor is a class template that defines the storage strategy and access policy for an scl::wrapper. Type must provide the following static methods, callable for Type&, Type&&, and Type const&:

Method Role
access(Self&&) Returns a reference to the held value.
execute(Self&&, Func&&) Invokes a callable in executor's context.

Optional methods (guard, unguard) may be provided to implement RAII locking; their presence is detected separately via is_guard_noexcept_v / is_unguard_noexcept_v.

cv-ref qualifiers on Type are stripped before the check (remove_cvref_t).

Template Parameters
TypeType to check.
See also
scl::feature::is_executor_v
scl::feature::inplace::plain
scl::feature::inplace::uninitialized
static_assert( executor<feature::inplace::plain<int> const>); // cv-ref stripped
static_assert(!executor<int>);