JUCE
Static Public Member Functions | List of all members
NullCheckedInvocation Struct Reference

Some helper methods for checking a callable object before invoking with the specified arguments. More...

Static Public Member Functions

template<typename... Signature, typename... Args>
static void invoke (std::function< Signature... > &&fn, Args &&... args)
 
template<typename Callable , typename... Args>
static void invoke (Callable &&fn, Args &&... args)
 
template<typename... Args>
static void invoke (std::nullptr_t, Args &&...)
 

Detailed Description

Some helper methods for checking a callable object before invoking with the specified arguments.

If the object is a std::function it will check for nullptr before calling. For a callable object it will invoke the function call operator.

Member Function Documentation

◆ invoke() [1/3]

template<typename... Signature, typename... Args>
static void NullCheckedInvocation::invoke ( std::function< Signature... > &&  fn,
Args &&...  args 
)
static

◆ invoke() [2/3]

template<typename Callable , typename... Args>
static void NullCheckedInvocation::invoke ( Callable &&  fn,
Args &&...  args 
)
static

◆ invoke() [3/3]

template<typename... Args>
static void NullCheckedInvocation::invoke ( std::nullptr_t  ,
Args &&  ... 
)
static

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