count_args.hpp
Go to the documentation of this file.
1 
2 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
3 
4 // Copyright Aleksey Gurtovoy 2000-2004
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 // See http://www.boost.org/libs/mpl for documentation.
11 
12 // $Id: count_args.hpp 13472 2017-08-22 07:53:44Z richean $
13 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
14 // $Revision: 13472 $
15 
19 
20 #if !defined(AUX778076_COUNT_ARGS_PARAM_NAME)
21 # define AUX778076_COUNT_ARGS_PARAM_NAME T
22 #endif
23 
24 #if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
25 # define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME
26 #endif
27 
28 // local macros, #undef-ined at the end of the header
29 
30 #if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES)
31 
34 
35 # define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT
36 # define AUX778076_COUNT_ARGS_PARAMS(param) \
37  BOOST_MPL_PP_PARAMS( \
38  AUX778076_COUNT_ARGS_ARITY \
39  , param \
40  ) \
41 
42 
43 #else
44 
48 
49 # define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT
50 # define AUX778076_COUNT_ARGS_PARAMS(param) \
51  BOOST_PP_ENUM_SHIFTED_PARAMS( \
52  BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \
53  , param \
54  ) \
55 
56 
57 #endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
58 
59 
60 #define AUX778076_IS_ARG_TEMPLATE_NAME \
61  BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \
62 
63 
64 #define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \
65  BOOST_PP_EXPR_IF(i, +) \
66  AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \
67 
68 
69 // is_<xxx>_arg
70 template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM >
72 {
73  BOOST_STATIC_CONSTANT(bool, value = true);
74 };
75 
76 template<>
77 struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT>
78 {
79  BOOST_STATIC_CONSTANT(bool, value = false);
80 };
81 
82 // <xxx>_count_args
83 template<
85  >
86 struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args)
87 {
89  AUX778076_COUNT_ARGS_ARITY
92  ));
93 };
94 
95 #undef AUX778076_COUNT_ARGS_FUNC
96 #undef AUX778076_IS_ARG_TEMPLATE_NAME
97 #undef AUX778076_COUNT_ARGS_PARAMS
98 #undef AUX778076_COUNT_ARGS_REPEAT
99 
100 #undef AUX778076_COUNT_ARGS_ARITY
101 #undef AUX778076_COUNT_ARGS_DEFAULT
102 #undef AUX778076_COUNT_ARGS_PREFIX
103 #undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
104 #undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM
105 #undef AUX778076_COUNT_ARGS_PARAM_NAME
AUX778076_COUNT_ARGS_REPEAT
#define AUX778076_COUNT_ARGS_REPEAT
Definition: count_args.hpp:35
BOOST_PP_CAT
struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX, _count_args)
Definition: count_args.hpp:86
BOOST_STATIC_CONSTANT
#define BOOST_STATIC_CONSTANT(type, assignment)
Definition: suffix.hpp:394
AUX778076_COUNT_ARGS_FUNC
#define AUX778076_COUNT_ARGS_FUNC(unused, i, param)
Definition: count_args.hpp:64
AUX778076_IS_ARG_TEMPLATE_NAME::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(bool, value=true)
cat.hpp
inc.hpp
AUX778076_IS_ARG_TEMPLATE_NAME
Definition: count_args.hpp:71
AUX778076_COUNT_ARGS_PARAMS
#define AUX778076_COUNT_ARGS_PARAMS(param)
Definition: count_args.hpp:36
params.hpp
repeat.hpp
expr_if.hpp
repeat.hpp
AUX778076_COUNT_ARGS_PARAM_NAME
#define AUX778076_COUNT_ARGS_PARAM_NAME
Definition: count_args.hpp:21
AUX778076_COUNT_ARGS_TEMPLATE_PARAM
#define AUX778076_COUNT_ARGS_TEMPLATE_PARAM
Definition: count_args.hpp:25
enum_shifted_params.hpp


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:38:10