Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkPPArgCount.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKPPARGCOUNT_H
14 #define MITKPPARGCOUNT_H
15 
16 #define MITK_PP_ARG_COUNT(...) MITK_PP_ARG_COUNT_((__VA_ARGS__, MITK_PP_RSEQ_N()))
17 
18 #define MITK_PP_ARG_COUNT_(tuple) MITK_PP_ARG_N tuple
19 
20 #define MITK_PP_ARG_N(_1, \
21  _2, \
22  _3, \
23  _4, \
24  _5, \
25  _6, \
26  _7, \
27  _8, \
28  _9, \
29  _10, \
30  _11, \
31  _12, \
32  _13, \
33  _14, \
34  _15, \
35  _16, \
36  _17, \
37  _18, \
38  _19, \
39  _20, \
40  _21, \
41  _22, \
42  _23, \
43  _24, \
44  _25, \
45  N, \
46  ...) \
47  N
48 
49 #define MITK_PP_RSEQ_N() 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
50 
51 #endif // MITKPPARGCOUNT_H