Contains functions that return functors that perform an operation without output; appropriate for functions like std::for_each.
More...
|
| template<typename T> |
| constexpr auto | push_back_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | emplace_back_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | push_front_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | emplace_front_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | append_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | insert_to (T &to) noexcept |
| template<typename T, GHPL_TYPENAME(std::output_iterator< T >) IT> |
| constexpr auto | output_to (IT &&to) |
| template<typename T> |
| constexpr auto | assign_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | add_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | stream_to (T &to) noexcept |
| template<typename T> |
| constexpr auto | stream_from (T &from) noexcept |
| template<typename... FUNCS> |
| constexpr auto | call_all (FUNCS &&... funcs) |
| | For funcs a, b, c, calls them as return (a(args...), b(args...), c(args...)).
|
| template<typename F> |
| constexpr auto | call_composed (F &&f) |
| | forwarding F can throw
|
| template<typename F, typename ... Fs> |
| constexpr auto | call_composed (F &&f, Fs &&... fs) |
| | For funcs a, b, c, calls them as return a(b(c(args...))).
|
| template<typename F> |
| constexpr auto | call_piped (F &&f) |
| | forwarding F can throw
|
| template<typename F, typename ... Fs> |
| constexpr auto | call_piped (F &&f, Fs &&... fs) |
| | For funcs a, b, c, calls them as return c(b(a(args...))); or return a(args...) |> b |> c;.
|
| template<typename THEN, typename IF> |
| constexpr auto | call_when (THEN &&op, IF &&predicate) |
| | Acts as if (predicate(args...)) op(args...);.
|
| template<typename THEN, typename IF, typename ELSE_VAL> |
| constexpr auto | call_when (THEN &&op, IF &&predicate, ELSE_VAL &&elseval) |
| | Acts as if (predicate(args...)) op(args...);.
|
| template<typename THEN, typename IF, typename ELSE> |
| constexpr auto | call_when_else (THEN &&op, IF &&predicate, ELSE &&elseop) |
| | Acts as if (predicate(args...)) return op(args...); else return elseop(args...);.
|
Contains functions that return functors that perform an operation without output; appropriate for functions like std::for_each.
template<typename... FUNCS>
| auto ghassanpl::op::call_all |
( |
FUNCS &&... | funcs | ) |
|
|
nodiscardconstexpr |
For funcs a, b, c, calls them as return (a(args...), b(args...), c(args...)).
- Returns
- return value of last call forwarding FUNCS can throw
Definition at line 168 of file functional.h.
template<typename F, typename ... Fs>
| auto ghassanpl::op::call_composed |
( |
F && | f, |
|
|
Fs &&... | fs ) |
|
nodiscardconstexpr |
For funcs a, b, c, calls them as return a(b(c(args...))).
forwarding F or Fs can throw
Definition at line 185 of file functional.h.
template<typename F, typename ... Fs>
| auto ghassanpl::op::call_piped |
( |
F && | f, |
|
|
Fs &&... | fs ) |
|
nodiscardconstexpr |
For funcs a, b, c, calls them as return c(b(a(args...))); or return a(args...) |> b |> c;.
forwarding F or Fs can throw
Definition at line 200 of file functional.h.