"ScL Feature"/
SCL Feature 0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
Loading...
Searching...
No Matches
ScL Wrapper

Composable value wrapper with pluggable executor strategy. More...

Namespaces

namespace  scl
 Root namespace of the ScL project.

Typedefs

template<typename Value, template< typename > class... Executors>
using scl::wrapper
 Composable proxy wrapper that delegates to Value through executors.

Detailed Description

Composable value wrapper with pluggable executor strategy.

A wrapper<Value, Executors...> proxies method calls to the held Value through a chain of executors. Each executor is a class template that can transparently add cross-cutting properties such as copy-on-write semantics, thread safety, or deferred invocation without modifying the wrapped type. Multiple executors are composed via left-fold; adjacent duplicates are collapsed automatically.

Typedef Documentation

◆ wrapper

template<typename Value, template< typename > class... Executors>
using scl::wrapper

Composable proxy wrapper that delegates to Value through executors.

Each executor is a class template E such that E<Value> proxies method calls and may add cross-cutting behaviour (e.g. COW, thread safety, deferred invocation). Executors are composed left-to-right; adjacent duplicates in the list are collapsed. Defaults to feature::inplace::plain — a zero-overhead direct proxy — when no executor is specified.

Template Parameters
ValueThe wrapped value type.
ExecutorsZero or more executor class templates.
wrapper<int> a{42}; // feature::inplace::plain (default)
wrapper<int, feature::inplace::plain> b{42}; // explicit plain
wrapper<int, feature::inplace::uninitialized> c{}; // deferred construction
::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