Composable proxy wrapper that delegates to Value through executors.
More...
#include <wrapper.h>
|
|
using | executor_type |
| | The outermost executor instantiation — Executor<value_type>.
|
|
using | value_type |
| | The wrapped value type.
|
|
| constexpr | wrapper () |
| | Default construction — default-initialises the executor.
|
template<typename... Args>
requires ::std::constructible_from<executor_type, Args...> |
| constexpr | wrapper (Args &&... args) |
| | Direct construction — forwards all arguments to the executor.
|
template<concepts::wrapper Other>
requires (!::std::same_as<::std::remove_cvref_t<Other>, wrapper> && ::std::constructible_from<executor_type, decltype(wrapper_constructor_resolver
<wrapper, Other &&>{other}.resolve())>) |
| constexpr | wrapper (Other &&other) |
| | Converting construction from a compatible wrapper type.
|
| constexpr | wrapper (wrapper &&other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper &other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper const &&other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper const &other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper const volatile &&other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper const volatile &other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper volatile &&other) |
| | Copy / move construction from the same wrapper type.
|
| constexpr | wrapper (wrapper volatile &other) |
| | Copy / move construction from the same wrapper type.
|
template<typename Value, template< typename > class... Executors>
class scl::wrapper< Value, Executors >
Composable proxy wrapper that delegates to Value through executors.
Each executor is a class template E such that E<Value> must satisfy concepts::executor — it must provide static access(Self&&) and execute(Self&&, Func&&) methods. 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
-
| Value | The wrapped value type. |
| Executors | Zero or more executor class templates. Each E must satisfy concepts::executor<E<Value>>. |
- See also
- scl::feature::concepts::executor
-
scl::feature::is_executor_v
Composable proxy wrapper that delegates to Value through executors.
Definition wrapper.h:72
constexpr wrapper()
Default construction — default-initialises the executor.
◆ wrapper() [1/11]
template<typename Value, template< typename > class... Executors>
Default construction — default-initialises the executor.
Participates in overload resolution only if executor_type is default-initialisable.
◆ wrapper() [2/11]
template<typename Value, template< typename > class... Executors>
template<typename... Args>
requires ::std::constructible_from<
executor_type, Args...>
| scl::wrapper< Value, Executors >::wrapper |
( |
Args &&... | args | ) |
|
|
explicitconstexpr |
Direct construction — forwards all arguments to the executor.
Participates in overload resolution only if executor_type is constructible from Args.
- Template Parameters
-
| Args | Argument types forwarded to the executor constructor. |
- Parameters
-
| args | Arguments forwarded to the executor constructor. |
◆ wrapper() [3/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > & | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [4/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > const & | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [5/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > volatile & | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [6/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > const volatile & | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [7/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > && | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [8/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > const && | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [9/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > volatile && | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [10/11]
template<typename Value, template< typename > class... Executors>
| scl::wrapper< Value, Executors >::wrapper |
( |
wrapper< Value, Executors > const volatile && | other | ) |
|
|
constexpr |
Copy / move construction from the same wrapper type.
All eight cv-ref qualifications of wrapper<Value, Executors...> are accepted. Each overload forwards other's executor through scl::forward_like so that the correct copy or move path is taken. Each overload participates in overload resolution only if executor_type is constructible from the corresponding cv-ref of executor_type (i.e. if the executor supports that operation).
- Parameters
-
| other | Source wrapper (any cv-ref qualification). |
◆ wrapper() [11/11]
template<typename Value, template< typename > class... Executors>
template<concepts::wrapper Other>
requires (!::std::same_as<::std::remove_cvref_t<Other>, wrapper> && ::std::constructible_from<
executor_type, decltype(wrapper_constructor_resolver
<wrapper, Other &&>{other}.resolve())>)
Converting construction from a compatible wrapper type.
Accepts any wrapper whose executor chain can be unwrapped / re-wrapped into this wrapper's executor via wrapper_constructor_resolver. Participates in overload resolution only if Other is a wrapper type other than self_type and executor_type is constructible from the resolved value.
- Template Parameters
-
| Other | Source wrapper type (cv-ref qualifiers are deduced). |
- Parameters
-
The documentation for this class was generated from the following file: