10 lines
299 B
C
10 lines
299 B
C
#ifndef TWN_VARARGCOUNT_H
|
|
#define TWN_VARARGCOUNT_H
|
|
|
|
#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
|
|
|
|
#endif
|