Basic implementation of a y-combinator.
More...
#include <utility.hpp>
|
| constexpr | y_combinator (Func recursive) noexcept(std::is_nothrow_move_constructible_v< Func >) |
| | Constructs a y-combinator from a given function.
|
| |
| template<typename... Args> |
| constexpr decltype(auto) | operator() (Args &&...args) const noexcept(std::is_nothrow_invocable_v< Func, const y_combinator &, Args... >) |
| | Invokes a y-combinator and therefore its underlying function.
|
| |
| template<typename... Args> |
| constexpr decltype(auto) | operator() (Args &&...args) noexcept(std::is_nothrow_invocable_v< Func, y_combinator &, Args... >) |
| | Invokes a y-combinator and therefore its underlying function.
|
| |
template<typename Func>
struct entt::y_combinator< Func >
Basic implementation of a y-combinator.
- Template Parameters
-
| Func | Type of a potentially recursive function. |
Definition at line 70 of file utility.hpp.
◆ y_combinator()
Constructs a y-combinator from a given function.
- Parameters
-
| recursive | A potentially recursive function. |
Definition at line 75 of file utility.hpp.
◆ operator()() [1/2]
template<typename Func>
template<typename... Args>
Invokes a y-combinator and therefore its underlying function.
- Template Parameters
-
| Args | Types of arguments to use to invoke the underlying function. |
- Parameters
-
| args | Parameters to use to invoke the underlying function. |
- Returns
- Return value of the underlying function, if any.
Definition at line 85 of file utility.hpp.
◆ operator()() [2/2]
template<typename Func>
template<typename... Args>
Invokes a y-combinator and therefore its underlying function.
- Template Parameters
-
| Args | Types of arguments to use to invoke the underlying function. |
- Parameters
-
| args | Parameters to use to invoke the underlying function. |
- Returns
- Return value of the underlying function, if any.
Definition at line 91 of file utility.hpp.
The documentation for this struct was generated from the following file: