JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::NullCheckedInvocation Struct Reference

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

#include <juce_Functional.h>

Static Public Member Functions

template<typename Callable , typename... Args, std::enable_if_t< detail::EqualityComparableToNullptr< Callable >::value, int > = 0>
static void invoke (Callable &&fn, Args &&... args)
 
template<typename Callable , typename... Args, std::enable_if_t<! detail::EqualityComparableToNullptr< Callable >::value, int > = 0>
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 provides a comparison operator for nullptr it will check before calling. For other objects it will just invoke the function call operator.

@tags{Core}

Member Function Documentation

◆ invoke() [1/3]

template<typename Callable , typename... Args, std::enable_if_t< detail::EqualityComparableToNullptr< Callable >::value, int > = 0>
static void juce::NullCheckedInvocation::invoke ( Callable &&  fn,
Args &&...  args 
)
inlinestatic

◆ invoke() [2/3]

template<typename Callable , typename... Args, std::enable_if_t<! detail::EqualityComparableToNullptr< Callable >::value, int > = 0>
static void juce::NullCheckedInvocation::invoke ( Callable &&  fn,
Args &&...  args 
)
inlinestatic

◆ invoke() [3/3]

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

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