EnTT 3.14.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(autooperator() (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(autooperator() (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
FuncType of a potentially recursive function.

Definition at line 70 of file utility.hpp.

Constructor & Destructor Documentation

◆ y_combinator()

template<typename Func >
constexpr entt::y_combinator< Func >::y_combinator ( Func recursive)
inlineconstexprnoexcept

Constructs a y-combinator from a given function.

Parameters
recursiveA potentially recursive function.

Definition at line 75 of file utility.hpp.

Member Function Documentation

◆ operator()() [1/2]

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

Invokes a y-combinator and therefore its underlying function.

Template Parameters
ArgsTypes of arguments to use to invoke the underlying function.
Parameters
argsParameters 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>
constexpr decltype(auto) entt::y_combinator< Func >::operator() ( Args &&... args)
inlineconstexprnoexcept

Invokes a y-combinator and therefore its underlying function.

Template Parameters
ArgsTypes of arguments to use to invoke the underlying function.
Parameters
argsParameters 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: