Template Class PREPROCESSOR_FOR
Defined in File preprocessor-helpers.h
Class Documentation
-
template<uint32_t START, uint32_t END, template<uint32_t> class EXECUTOR>
class PREPROCESSOR_FOR Template helper for compile time loops for range [START, END)
Example of usage:
template<uint32_t CURRENT> struct StuffMakeAHappener { static void OnEach(void * pParam) { make_happen<CURRENT>(pParam); } };
PREPROCESSOR_LOOP<0, 10, StuffMakeAHappener>(somePointer);
Will unroll into following:
make_happen<0>(somePointer); make_happen<1>(somePointer); ... make_happen<9>(somePointer);
- Template Parameters
START -- Loop iteration initial value
END -- Loop iteration stop value
EXECUTOR -- Template struct or class with one uint32_t template parameter that needs to implement static void OnEach(void * pParam);
Public Functions
-
inline PREPROCESSOR_FOR(void *param = nullptr)