EnTT 3.13.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 >:
Inheritance graph
[legend]
Collaboration diagram for entt::forward_apply< Func >:
Collaboration graph
[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
FuncType of underlying invocable object.

Definition at line 58 of file tuple.hpp.

Constructor & Destructor Documentation

◆ forward_apply()

template<typename Func >
template<typename... Args>
constexpr entt::forward_apply< Func >::forward_apply ( Args &&...  args)
inlineconstexprnoexcept

Constructs a forward-and-apply object.

Template Parameters
ArgsTypes of arguments to use to construct the new instance.
Parameters
argsParameters to use to construct the instance.

Definition at line 65 of file tuple.hpp.

Member Function Documentation

◆ operator()() [1/2]

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

Forwards and applies the arguments with the underlying function.

Template Parameters
TypeTuple-like type to forward to the underlying function.
Parameters
argsParameters to forward to the underlying function.
Returns
Return value of the underlying function, if any.

Definition at line 81 of file tuple.hpp.

◆ operator()() [2/2]

template<typename Func >
template<typename Type >
constexpr decltype(auto) entt::forward_apply< Func >::operator() ( Type &&  args)
inlineconstexprnoexcept

Forwards and applies the arguments with the underlying function.

Template Parameters
TypeTuple-like type to forward to the underlying function.
Parameters
argsParameters to forward to the underlying function.
Returns
Return value of the underlying function, if any.

Definition at line 75 of file tuple.hpp.


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