Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKPPARGCOUNT_H
18 #define MITKPPARGCOUNT_H
19 
20 #define MITK_PP_ARG_COUNT(...) MITK_PP_ARG_COUNT_((__VA_ARGS__, MITK_PP_RSEQ_N()))
21 
22 #define MITK_PP_ARG_COUNT_(tuple) MITK_PP_ARG_N tuple
23 
24 #define MITK_PP_ARG_N(_1, \
25  _2, \
26  _3, \
27  _4, \
28  _5, \
29  _6, \
30  _7, \
31  _8, \
32  _9, \
33  _10, \
34  _11, \
35  _12, \
36  _13, \
37  _14, \
38  _15, \
39  _16, \
40  _17, \
41  _18, \
42  _19, \
43  _20, \
44  _21, \
45  _22, \
46  _23, \
47  _24, \
48  _25, \
49  N, \
50  ...) \
51  N
52 
53 #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
54 
55 #endif // MITKPPARGCOUNT_H