townengine/include/twn_varargcount.h

10 lines
299 B
C
Raw Normal View History

#ifndef TWN_VARARGCOUNT_H
#define TWN_VARARGCOUNT_H
2024-07-30 12:22:07 +00:00
#define m_narg(...) m_narg_(__VA_ARGS__, m_rseq_n_())
#define m_narg_(...) m_arg_n_(__VA_ARGS__)
#define m_arg_n_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, N, ...) N
#define m_rseq_n_() 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
2024-07-30 12:22:07 +00:00
#endif