APPLY_MACRO_FOREACH_HELPER
- Macro
- August 22, 2025
Table of Contents
APPLY_MACRO_FOREACH_HELPER
APPLY_MACRO_FOREACH_HELPER
Description
Helper macro to apply given macro to the very first argument in list of variadic macro arguments Then expands to applying the same macro to more arguments only if there are more
Usage example (Cross-references)
- In
Types.h:628
:
/// Reference : https://www.scs.stanford.edu/~dm/blog/va-opt.html
///
#define APPLY_MACRO_FOREACH(macro, ...) __VA_OPT__(TRICK_EXPAND(APPLY_MACRO_FOREACH_HELPER(macro, __VA_ARGS__)))
///
- In
Types.h:640
:
/// Helper macro to delay evaluation in text generation (pre-processing) phase of macro
///
#define APPLY_MACRO_FOREACH_AGAIN() APPLY_MACRO_FOREACH_HELPER
#endif // MISRA_TYPES_H