Functional type, composing multiple other functional types via the provided strategy.
More...
|
template<class FirstCTorArg , class SecondCTorArg , class... OtherCTorArgs>
requires std::constructible_from<FirstFn, FirstCTorArg> && std::constructible_from<SecondFn, SecondCTorArg> && (... && std::constructible_from<OtherFns, OtherCTorArgs>) |
constexpr | Composition (FirstCTorArg &&firstArg, SecondCTorArg &&secondArg, OtherCTorArgs &&... otherArgs) noexcept(std::is_nothrow_constructible_v< FirstFn, FirstCTorArg > &&std::is_nothrow_constructible_v< SecondFn, SecondCTorArg > &&(... &&std::is_nothrow_constructible_v< OtherFns, OtherCTorArgs >)) |
| Constructor forwarding the given args to the related functional member.
|
|
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<const FirstFn&, const SecondFn&, const OtherFns&...>, Args...> |
constexpr decltype(auto) | operator() (Args &&... args) const &noexcept(std::is_nothrow_invocable_v< CompStrategy, std::tuple< const FirstFn &, const SecondFn &, const OtherFns &... >, Args... >) |
| Call operator, providing the member functionals and given arguments to the composition strategy.
|
|
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<FirstFn&, SecondFn&, OtherFns&...>, Args...> |
constexpr decltype(auto) | operator() (Args &&... args) &noexcept(std::is_nothrow_invocable_v< CompStrategy, std::tuple< FirstFn &, SecondFn &, OtherFns &... >, Args... >) |
| Call operator, providing the member functionals and given arguments to the composition strategy.
|
|
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<const FirstFn&&, const SecondFn&&, const OtherFns&&...>, Args...> |
constexpr decltype(auto) | operator() (Args &&... args) const &&noexcept(std::is_nothrow_invocable_v< CompStrategy, std::tuple< const FirstFn &&, const SecondFn &&, const OtherFns &&... >, Args... >) |
| Call operator, providing the member functionals and given arguments to the composition strategy.
|
|
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<FirstFn&&, SecondFn&&, OtherFns&&...>, Args...> |
constexpr decltype(auto) | operator() (Args &&... args) &&noexcept(std::is_nothrow_invocable_v< CompStrategy, std::tuple< FirstFn &&, SecondFn &&, OtherFns &&... >, Args... >) |
| Call operator, providing the member functionals and given arguments to the composition strategy.
|
|
constexpr std::tuple< const FirstFn &, const SecondFn &, const OtherFns &... > | fns () const &noexcept |
| Getter to the member functions.
|
|
constexpr std::tuple< FirstFn &, SecondFn &, OtherFns &... > | fns () &noexcept |
| Getter to the member functions.
|
|
constexpr std::tuple< const FirstFn &&, const SecondFn &&, const OtherFns &&... > | fns () const &&noexcept |
| Getter to the member functions.
|
|
constexpr std::tuple< FirstFn &&, SecondFn &&, OtherFns &&... > | fns () &&noexcept |
| Getter to the member functions.
|
|
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
class sl::functional::Composition< CompStrategy, FirstFn, SecondFn, OtherFns >
Functional type, composing multiple other functional types via the provided strategy.
- Template Parameters
-
CompStrategy | The provided strategy type. |
FirstFn | The first functional type. |
SecondFn | The second functional type. |
OtherFns | Other functional types. |
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
template<class FirstCTorArg , class SecondCTorArg , class... OtherCTorArgs>
requires std::constructible_from<FirstFn, FirstCTorArg> && std::constructible_from<SecondFn, SecondCTorArg> && (... && std::constructible_from<OtherFns, OtherCTorArgs>)
constexpr sl::functional::Composition< CompStrategy, FirstFn, SecondFn, OtherFns >::Composition |
( |
FirstCTorArg && |
firstArg, |
|
|
SecondCTorArg && |
secondArg, |
|
|
OtherCTorArgs &&... |
otherArgs |
|
) |
| |
|
inlineconstexprnoexcept |
Constructor forwarding the given args to the related functional member.
- Template Parameters
-
FirstCTorArg | The constructor argument type of the first functional. |
SecondCTorArg | The constructor argument type of the second functional. |
OtherCTorArgs | The constructor argument types of other functionals. |
- Parameters
-
firstArg | The constructor argument of the first functional. |
secondArg | The constructor argument of the second functional. |
otherArgs | The constructor argument of other functionals. |
- Exceptions
-
Does | not throw, if all functional constructors are noexcept. |
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<FirstFn&&, SecondFn&&, OtherFns&&...>, Args...>
Call operator, providing the member functionals and given arguments to the composition strategy.
- Template Parameters
-
Args | Given argument types. |
- Parameters
-
- Returns
- Forwards the result of the composition strategy call.
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<FirstFn&, SecondFn&, OtherFns&...>, Args...>
Call operator, providing the member functionals and given arguments to the composition strategy.
- Template Parameters
-
Args | Given argument types. |
- Parameters
-
- Returns
- Forwards the result of the composition strategy call.
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<const FirstFn&&, const SecondFn&&, const OtherFns&&...>, Args...>
constexpr decltype(auto) sl::functional::Composition< CompStrategy, FirstFn, SecondFn, OtherFns >::operator() |
( |
Args &&... |
args | ) |
const && |
|
inlineconstexprnoexcept |
Call operator, providing the member functionals and given arguments to the composition strategy.
- Template Parameters
-
Args | Given argument types. |
- Parameters
-
- Returns
- Forwards the result of the composition strategy call.
template<composition_strategy CompStrategy, function FirstFn, function SecondFn, function... OtherFns>
template<class... Args>
requires std::invocable<CompStrategy, std::tuple<const FirstFn&, const SecondFn&, const OtherFns&...>, Args...>
constexpr decltype(auto) sl::functional::Composition< CompStrategy, FirstFn, SecondFn, OtherFns >::operator() |
( |
Args &&... |
args | ) |
const & |
|
inlineconstexprnoexcept |
Call operator, providing the member functionals and given arguments to the composition strategy.
- Template Parameters
-
Args | Given argument types. |
- Parameters
-
- Returns
- Forwards the result of the composition strategy call.