EnTT: entt::y_combinator< Func > Struct Template Reference

EnTT 3.15.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
entt::y_combinator< Func > Struct Template Reference

Basic implementation of a y-combinator. More...

`#include <utility.hpp>`

## Public Member Functions
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.

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ y_combinator()

template<typename Func>

entt::y_combinator< Func >::y_combinator | ( | Func | recursive | ) |
| inlineconstexprnoexcept

Constructs a y-combinator from a given function.

Parameters

  recursive | A potentially recursive function.

Definition at line 75 of file utility.hpp.

## Member Function Documentation

## ◆ operator()() [1/2]

template<typename Func>
template<typename... Args>

decltype(auto) entt::y_combinator< Func >::operator() | ( | Args &&... | args | ) | const
| inlineconstexprnoexcept

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>

decltype(auto) entt::y_combinator< Func >::operator() | ( | Args &&... | args | ) |
| inlineconstexprnoexcept

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:

- src/entt/core/utility.hpp