"ScL Feature"
/
SCL Feature
0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
Toggle main menu visibility
Loading...
Searching...
No Matches
wrapper.h
1
#pragma once
2
17
18
#include <scl/feature/detail/wrapper.h>
19
#include <scl/feature/inplace/plain.h>
20
21
#include <type_traits>
22
23
namespace
scl::feature::detail
24
{
25
template
<
typename
State,
template
<
typename
>
class
... Executor>
26
struct
wrapper_fold
27
{
28
using
type = State;
29
};
30
31
template
<
typename
State,
template
<
typename
>
class
Executor,
template
<
typename
>
class
... Rest>
32
struct
wrapper_fold<State, Executor, Rest...>
33
{
34
using
type =
typename
wrapper_fold<::scl::feature::detail::wrapper<State, Executor>, Rest...>::type;
35
};
36
37
template
<
typename
Value,
template
<
typename
>
class
Executor,
template
<
typename
>
class
... Rest>
38
struct
wrapper_fold<::scl::feature::detail::wrapper<Value, Executor>, Executor, Rest...>
39
{
40
using
type =
typename
wrapper_fold<::scl::feature::detail::wrapper<Value, Executor>, Rest...>::type;
41
};
42
}
// namespace scl::feature::detail
43
44
namespace
scl
45
{
66
template
<
typename
Value,
template
<
typename
>
class
... Executors>
67
using
wrapper
= ::std::conditional_t<
sizeof
...(Executors) == 0,
68
typename ::scl::feature::detail::wrapper_fold<Value, ::scl::feature::inplace::plain>::type,
69
typename ::scl::feature::detail::wrapper_fold<Value, Executors...>::type>;
70
}
// namespace scl
71
// end of group scl_feature_wrapper
scl::wrapper
::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
scl
Root namespace of the ScL project.
src
scl
feature
wrapper.h
Generated by
1.18.0