The core class, wrapping one functional object and enabling a variety of composing operators for it.
More...
|
template<class... Args>
requires std::constructible_from<Fn, Args...> |
constexpr | BasicClosure (Args &&... args) noexcept(std::is_nothrow_constructible_v< Fn, Args... >) |
| Forwarding constructor, forwarding all of its arguments to its stored functional.
|
|
| BasicClosure (const BasicClosure &)=default |
| Defaulted copy constructor.
|
|
BasicClosure & | operator= (const BasicClosure &)=default |
| Defaulted copy assign operator.
|
|
| BasicClosure (BasicClosure &&)=default |
| Defaulted move constructor.
|
|
BasicClosure & | operator= (BasicClosure &&)=default |
| Defaulted move assign operator.
|
|
| ~BasicClosure ()=default |
| Defaulted destructor.
|
|
constexpr | operator const Fn & () const &noexcept |
| Conversion operator, providing access to the stored functional as const lvalue-reference.
|
|
constexpr | operator Fn & () &noexcept |
| Conversion operator, providing access to the stored functional as lvalue-reference.
|
|
constexpr | operator const Fn && () const &&noexcept |
| Conversion operator, providing access to the stored functional as const rvalue-reference.
|
|
constexpr | operator Fn && () &&noexcept |
| Conversion operator, providing access to the stored functional as rvalue-reference.
|
|
template<function Fn, template< class > class InvokePolicy, template< class > class... OperatorPolicies>
requires invoke_policy<InvokePolicy> && (... && operator_policy<OperatorPolicies>)
class sl::functional::BasicClosure< Fn, InvokePolicy, OperatorPolicies >
The core class, wrapping one functional object and enabling a variety of composing operators for it.
- Template Parameters
-
Fn | The wrapped functional type. |
InvokePolicy | CRTP type, providing different operator () implementations. |
OperatorPolicies | CRTP types, providing different composing operators. |
template<function Fn, template< class > class InvokePolicy, template< class > class... OperatorPolicies>
template<class... Args>
requires std::constructible_from<Fn, Args...>
|
inlineexplicitconstexprnoexcept |
Forwarding constructor, forwarding all of its arguments to its stored functional.
- Template Parameters
-
Args | Constructor argument types. |
- Parameters
-
args | Constructor arguments. |