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

Namespace of the ScL Feature module. More...

Namespaces

namespace  concepts
 C++20 concepts for ScL Feature types.

Classes

struct  executor_trait
 Trait that provides access to the executor inside a wrapper. More...

Typedefs

template<typename Refer>
using wrapper_guard
 RAII guard providing access to the value held by a wrapper or a plain reference.

Variables

template<typename Expected, typename Test>
constexpr bool is_compatible_with_part_of_v
 Checks whether Expected (a wrapper) recursively contains a value that is compatible with Test (also a wrapper).
template<typename Expected, typename Test>
constexpr bool is_compatible_with_v
 Checks whether Test is compatible with (usable in place of) Expected.
template<typename Expected, typename Test>
constexpr bool is_part_compatible_with_v
 Checks whether Test (a wrapper) recursively contains a value that is compatible with Expected (also a wrapper).
template<typename Type>
constexpr bool is_wrapper_v
 Checks whether Type is a wrapper specialization.

Detailed Description

Namespace of the ScL Feature module.

Typedef Documentation

◆ wrapper_guard

template<typename Refer>
using scl::feature::wrapper_guard

RAII guard providing access to the value held by a wrapper or a plain reference.

For wrapper types calls guard() on the executor at construction and unguard() at destruction (both are no-ops if the executor does not define them). Exposes value() to reach the stored value with the same cv- and ref-qualifiers as the incoming reference.

For non-wrapper types simply holds the reference; no guard/unguard is performed.

Template Parameters
ReferReference type — either wrapper<V,E> cv-ref or a plain value cv-ref.
feature::wrapper_guard<decltype(w) &> g{w};
// g.value() == 42
::std::conditional_t< sizeof...(Executors)==0, typename ::scl::feature::detail::wrapper_fold< Value, ::scl::feature::inplace::plain >::type, typename ::scl::feature::detail::wrapper_fold< Value, Executors... >::type > wrapper
Composable proxy wrapper that delegates to Value through executors.
Definition wrapper.h:67
detail::wrapper_guard< Refer, ::scl::feature::is_wrapper_v<::std::remove_cvref_t< Refer > > ? detail::wrapper_guard_case::wrapper :detail::wrapper_guard_case::value > wrapper_guard
RAII guard providing access to the value held by a wrapper or a plain reference.
Definition wrapper_guard.h:29