HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TfFunctionRef< Ret(Args...)> Class Template Reference

#include <functionRef.h>

Public Member Functions

template<class Fn , class = std::enable_if_t<!_IsFunctionRef<Fn>::value>>
constexpr TfFunctionRef (Fn &fn) noexcept
 Construct with an lvalue callable fn. More...
 
 TfFunctionRef (TfFunctionRef const &rhs) noexcept=default
 
TfFunctionRefoperator= (TfFunctionRef const &rhs) noexcept=default
 
template<class Fn >
std::enable_if_t
<!_IsFunctionRef< Fn >::value,
TfFunctionRef & > 
operator= (Fn &fn) noexcept
 Assign from an lvalue callable fn. More...
 
void swap (TfFunctionRef &other) noexcept
 
Ret operator() (Args...args) const
 Invoke the callable that this object refers to with args. More...
 

Detailed Description

template<class Ret, class... Args>
class TfFunctionRef< Ret(Args...)>

Definition at line 99 of file functionRef.h.

Constructor & Destructor Documentation

template<class Ret , class... Args>
template<class Fn , class = std::enable_if_t<!_IsFunctionRef<Fn>::value>>
constexpr TfFunctionRef< Ret(Args...)>::TfFunctionRef ( Fn &  fn)
inlinenoexcept

Construct with an lvalue callable fn.

Definition at line 112 of file functionRef.h.

template<class Ret , class... Args>
TfFunctionRef< Ret(Args...)>::TfFunctionRef ( TfFunctionRef< Ret(Args...)> const rhs)
defaultnoexcept

Copy construct from another TfFunctionRef. The constructed TfFunctionRef refers to the same callable as rhs.

Member Function Documentation

template<class Ret , class... Args>
Ret TfFunctionRef< Ret(Args...)>::operator() ( Args...  args) const
inline

Invoke the callable that this object refers to with args.

Definition at line 142 of file functionRef.h.

template<class Ret , class... Args>
TfFunctionRef& TfFunctionRef< Ret(Args...)>::operator= ( TfFunctionRef< Ret(Args...)> const rhs)
defaultnoexcept

Assign from another TfFunctionRef. After assignment this object refers to the same callable as rhs.

template<class Ret , class... Args>
template<class Fn >
std::enable_if_t<!_IsFunctionRef<Fn>::value, TfFunctionRef &> TfFunctionRef< Ret(Args...)>::operator= ( Fn &  fn)
inlinenoexcept

Assign from an lvalue callable fn.

Definition at line 129 of file functionRef.h.

template<class Ret , class... Args>
void TfFunctionRef< Ret(Args...)>::swap ( TfFunctionRef< Ret(Args...)> &  other)
inlinenoexcept

Swap this and other. After the swap, this refers to other's previous callable, and other refers to this's previous callable.

Definition at line 136 of file functionRef.h.


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