HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_CallIf< CONDITION > Struct Template Reference

#include <SYS_CallIf.h>

Static Public Member Functions

template<typename FUNCTOR , typename... ARGS>
static SYS_CALLIF_DEPRECATED
SYS_FORCE_INLINE void 
call (FUNCTOR functor, ARGS &&...args)
 

Detailed Description

template<bool CONDITION>
struct SYS_CallIf< CONDITION >

This is replaced by 'if constexpr' in C++17.

This function is for use with lambdas to force the compiler to not even try compiling or inlining function calls when a compile-time condition is false.

Usage: SYS_CallIf<CONDITION>::call([&](SYS_CALLIF_AUTO) { ... });

Note
Your lambda must have exactly 1 parameter of type SYS_CALLIF_AUTO

Definition at line 45 of file SYS_CallIf.h.

Member Function Documentation

template<bool CONDITION>
template<typename FUNCTOR , typename... ARGS>
static SYS_CALLIF_DEPRECATED SYS_FORCE_INLINE void SYS_CallIf< CONDITION >::call ( FUNCTOR  functor,
ARGS &&...  args 
)
inlinestatic

Definition at line 49 of file SYS_CallIf.h.


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