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

EnTT 3.15.0

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

Utility class to forward-and-apply tuple objects. More...

`#include <tuple.hpp>`

Inheritance diagram for entt::forward_apply< Func >:
[legend]
Collaboration diagram for entt::forward_apply< Func >:
[legend]

## Public Member Functions
template<typename... Args>
constexpr | forward_apply (Args &&...args) noexcept(std::is_nothrow_constructible_v< Func, Args... >)
| Constructs a forward-and-apply object.
template<typename Type>
constexpr decltype(auto) | operator() (Type &&args) noexcept(noexcept(std::apply(std::declval< Func & >(), args)))
| Forwards and applies the arguments with the underlying function.
template<typename Type>
constexpr decltype(auto) | operator() (Type &&args) const noexcept(noexcept(std::apply(std::declval< const Func & >(), args)))
| Forwards and applies the arguments with the underlying function.

## Detailed Description

template<typename Func>
struct entt::forward_apply< Func >

Utility class to forward-and-apply tuple objects.

Template Parameters

  Func | Type of underlying invocable object.

Definition at line 53 of file tuple.hpp.

## Constructor & Destructor Documentation

## ◆ forward_apply()

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

entt::forward_apply< Func >::forward_apply | ( | Args &&... | args | ) |
| inlineconstexprnoexcept

Constructs a forward-and-apply object.

Template Parameters

  Args | Types of arguments to use to construct the new instance.

Parameters

  args | Parameters to use to construct the instance.

Definition at line 60 of file tuple.hpp.

## Member Function Documentation

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

template<typename Func>
template<typename Type>

decltype(auto) entt::forward_apply< Func >::operator() | ( | Type && | args | ) | const
| inlineconstexprnoexcept

Forwards and applies the arguments with the underlying function.

Template Parameters

  Type | Tuple-like type to forward to the underlying function.

Parameters

  args | Parameters to forward to the underlying function.

Returns
  Return value of the underlying function, if any.

Definition at line 76 of file tuple.hpp.

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

template<typename Func>
template<typename Type>

decltype(auto) entt::forward_apply< Func >::operator() | ( | Type && | args | ) |
| inlineconstexprnoexcept

Forwards and applies the arguments with the underlying function.

Template Parameters

  Type | Tuple-like type to forward to the underlying function.

Parameters

  args | Parameters to forward to the underlying function.

Returns
  Return value of the underlying function, if any.

Definition at line 70 of file tuple.hpp.

The documentation for this struct was generated from the following file:

- src/entt/core/tuple.hpp