numeric_op.hpp
Go to the documentation of this file.
1 
2 #if !defined(BOOST_PP_IS_ITERATING)
3 
5 
6 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
7 
8 // Copyright Aleksey Gurtovoy 2000-2004
9 //
10 // Distributed under the Boost Software License, Version 1.0.
11 // (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
13 //
14 // See http://www.boost.org/libs/mpl for documentation.
15 
16 // $Id: numeric_op.hpp 13472 2017-08-22 07:53:44Z richean $
17 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
18 // $Revision: 13472 $
19 
20 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
22 # include <boost/mpl/apply_wrap.hpp>
23 # include <boost/mpl/if.hpp>
24 # include <boost/mpl/tag.hpp>
26 # include <boost/mpl/aux_/na.hpp>
33 #endif
34 
36 
37 #if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
38  || defined(BOOST_MPL_PREPROCESSING_MODE)
39 
53 
58 
59 
60 #if !defined(AUX778076_OP_ARITY)
61 # define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
62 #endif
63 
64 #if !defined(AUX778076_OP_IMPL_NAME)
65 # define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl)
66 #endif
67 
68 #if !defined(AUX778076_OP_TAG_NAME)
69 # define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag)
70 #endif
71 
72 namespace boost { namespace mpl {
73 
74 template<
75  typename Tag1
76  , typename Tag2
77 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
78  , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
79  , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
80  >
81 struct AUX778076_OP_IMPL_NAME
82  : if_c<
83  ( tag1_ > tag2_ )
84 #else
85  >
86 struct AUX778076_OP_IMPL_NAME
87  : if_c<
90  )
91 #endif
92  , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag1>,Tag1,Tag2 >
93  , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag2,Tag2>,Tag1,Tag2 >
94  >::type
95 {
96 };
97 
99 template<> struct AUX778076_OP_IMPL_NAME<na,na>
100 {
101  template< typename U1, typename U2 > struct apply
102  {
103  typedef apply type;
104  BOOST_STATIC_CONSTANT(int, value = 0);
105  };
106 };
107 
108 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
109 template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag>
110 {
111  template< typename U1, typename U2 > struct apply
112  {
113  typedef apply type;
114  BOOST_STATIC_CONSTANT(int, value = 0);
115  };
116 };
117 
118 template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na>
119 {
120  template< typename U1, typename U2 > struct apply
121  {
122  typedef apply type;
123  BOOST_STATIC_CONSTANT(int, value = 0);
124  };
125 };
126 #else
127 template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag>
128 {
129  template< typename U1, typename U2 > struct apply
130  {
131  typedef apply type;
132  BOOST_STATIC_CONSTANT(int, value = 0);
133  };
134 };
135 
136 template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na>
137 {
138  template< typename U1, typename U2 > struct apply
139  {
140  typedef apply type;
141  BOOST_STATIC_CONSTANT(int, value = 0);
142  };
143 };
144 #endif
145 
146 
147 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
148  && BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
149 template< typename T > struct AUX778076_OP_TAG_NAME
150  : tag<T,na>
151 {
152 };
153 #else
154 template< typename T > struct AUX778076_OP_TAG_NAME
155 {
156  typedef typename T::tag type;
157 };
158 #endif
159 
160 
161 #if AUX778076_OP_ARITY != 2
162 
163 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
164 
165 # define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))>
166 # define AUX778076_OP_N_CALLS(i, N) \
167  BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \
168  N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \
169 
170 
171 template<
172  typename BOOST_MPL_AUX_NA_PARAM(N1)
173  , typename BOOST_MPL_AUX_NA_PARAM(N2)
174  BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
175  >
176 struct AUX778076_OP_NAME
177  : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N)
178 {
183  )
184 };
185 
186 #define BOOST_PP_ITERATION_PARAMS_1 \
187  (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, <boost/mpl/aux_/numeric_op.hpp> ))
188 #include BOOST_PP_ITERATE()
189 
190 # undef AUX778076_OP_N_CALLS
191 # undef AUX778076_OP_RIGHT_OPERAND
192 
193 # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
194 
196 template<
197  typename BOOST_MPL_AUX_NA_PARAM(N1)
198  , typename BOOST_MPL_AUX_NA_PARAM(N2)
199  >
201 
202 template<
203  typename BOOST_MPL_AUX_NA_PARAM(N1)
204  , typename BOOST_MPL_AUX_NA_PARAM(N2)
205  BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
206  >
207 struct AUX778076_OP_NAME
208 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
209  : aux::msvc_eti_base< typename if_<
210 #else
211  : if_<
212 #endif
213  is_na<N3>
214  , BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
218  >
219  >::type
220 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
221  >
222 #endif
223 {
228  )
229 };
230 
231 template<
232  typename N1
233  , typename N2
234  >
236 
237 #endif
238 
239 #else // AUX778076_OP_ARITY == 2
240 
241 template<
242  typename BOOST_MPL_AUX_NA_PARAM(N1)
243  , typename BOOST_MPL_AUX_NA_PARAM(N2)
244  >
245 struct AUX778076_OP_NAME
246 
247 #endif
248 
249 #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
250  : AUX778076_OP_IMPL_NAME<
251  typename AUX778076_OP_TAG_NAME<N1>::type
252  , typename AUX778076_OP_TAG_NAME<N2>::type
253  >::template apply<N1,N2>::type
254 #else
255  : aux::msvc_eti_base< typename apply_wrap2<
256  AUX778076_OP_IMPL_NAME<
257  typename AUX778076_OP_TAG_NAME<N1>::type
258  , typename AUX778076_OP_TAG_NAME<N2>::type
259  >
260  , N1
261  , N2
262  >::type >::type
263 #endif
264 {
265 #if AUX778076_OP_ARITY != 2
266 
267 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
272  )
273 # else
275 # endif
276 
277 #else
279 #endif
280 };
281 
283 
284 }}
285 
286 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
287 
289 
290 // For gcc 4.4 compatability, we must include the
291 // BOOST_PP_ITERATION_DEPTH test inside an #else clause.
292 #else // BOOST_PP_IS_ITERATING
293 #if BOOST_PP_ITERATION_DEPTH() == 1
294 
295 # define i_ BOOST_PP_FRAME_ITERATION(1)
296 
297 template<
298  BOOST_MPL_PP_PARAMS(i_, typename N)
299  >
301 #if i_ != 2
302  : AUX778076_OP_N_CALLS(i_, N)
303 {
308  )
309 };
310 #endif
311 
312 # undef i_
313 
314 #endif // BOOST_PP_ITERATION_DEPTH()
315 #endif // BOOST_PP_IS_ITERATING
BOOST_MPL_AUX_NA_SPEC2
#define BOOST_MPL_AUX_NA_SPEC2(i, j, name)
Definition: na_spec.hpp:166
BOOST_PP_CAT
struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX, _count_args)
Definition: count_args.hpp:86
BOOST_WORKAROUND
#define BOOST_WORKAROUND(symbol, test)
Definition: detail/workaround.hpp:233
BOOST_STATIC_CONSTANT
#define BOOST_STATIC_CONSTANT(type, assignment)
Definition: suffix.hpp:394
na
Definition: na_fwd.hpp:22
BOOST_PP_INC
#define BOOST_PP_INC(x)
Definition: arithmetic/inc.hpp:24
ctps.hpp
BOOST_MPL_PP_PARAMS
#define BOOST_MPL_PP_PARAMS(n, p)
Definition: params.hpp:28
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC
#define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params)
Definition: lambda_support.hpp:21
BOOST_MPL_AUX_NA_PARAM
#define BOOST_MPL_AUX_NA_PARAM(param)
Definition: na_spec.hpp:152
BOOST_MPL_AUX_NTTP_DECL
#define BOOST_MPL_AUX_NTTP_DECL(T, x)
Definition: nttp_decl.hpp:31
na_spec.hpp
BOOST_MPL_PP_DEF_PARAMS_TAIL
#define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value)
Definition: def_params_tail.hpp:91
template
string template
value_wknd.hpp
BOOST_MPL_AUX_MSVC_VALUE_WKND
#define BOOST_MPL_AUX_MSVC_VALUE_WKND(C)
Definition: value_wknd.hpp:58
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
arity.hpp
AUX778076_OP_NAME
#define AUX778076_OP_NAME
Definition: equal_to.hpp:17
BOOST_MPL_AUX_NESTED_VALUE_WKND
#define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C)
Definition: value_wknd.hpp:67
cat.hpp
def_params_tail.hpp
BOOST_MPL_AUX_LAMBDA_SUPPORT
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params)
Definition: lambda_support.hpp:22
na.hpp
workaround.hpp
add.hpp
ext_params.hpp
inc.hpp
msvc.hpp
nttp_decl.hpp
numeric_cast.hpp
eti.hpp
tag.hpp
boost::foreach::tag
boost_foreach_argument_dependent_lookup_hack tag
Definition: foreach_fwd.hpp:31
apply_wrap.hpp
params.hpp
repeat.hpp
msvc_eti_base.hpp
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS
#define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def)
Definition: partial_spec_params.hpp:23
AUX778076_OP_ARITY
#define AUX778076_OP_ARITY
Definition: comparison_op.hpp:25
BOOST_MPL_PP_EXT_PARAMS
#define BOOST_MPL_PP_EXT_PARAMS(i, j, p)
Definition: ext_params.hpp:29
numeric_cast_utils.hpp
partial_spec_params.hpp
BOOST_MSVC
#define BOOST_MSVC
Definition: visualc.hpp:23
enum.hpp
static_constant.hpp
dec.hpp
lambda_support.hpp
sub.hpp
if.hpp
iterate.hpp


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