Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 #if !defined(BOOST_PP_IS_ITERATING)
6 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
8 // Copyright Aleksey Gurtovoy 2000-2004
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)
14 // See http://www.boost.org/libs/mpl for documentation.
16 // $Source: /cvsroot/boost/boost/boost/mpl/aux_/numeric_op.hpp,v $
17 // $Date: 2005/08/25 16:27:21 $
20 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
21 # include <boost/mpl/numeric_cast.hpp>
22 # include <boost/mpl/apply_wrap.hpp>
23 # include <boost/mpl/if.hpp>
24 # include <boost/mpl/tag.hpp>
25 # include <boost/mpl/aux_/numeric_cast_utils.hpp>
26 # include <boost/mpl/aux_/na.hpp>
27 # include <boost/mpl/aux_/na_spec.hpp>
28 # include <boost/mpl/aux_/lambda_support.hpp>
29 # include <boost/mpl/aux_/msvc_eti_base.hpp>
30 # include <boost/mpl/aux_/value_wknd.hpp>
31 # include <boost/mpl/aux_/config/eti.hpp>
32 # include <boost/mpl/aux_/nttp_decl.hpp>
35 #include <boost/mpl/aux_/config/static_constant.hpp>
37 #if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
38 || defined(BOOST_MPL_PREPROCESSING_MODE)
40 # include <boost/mpl/limits/arity.hpp>
41 # include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
42 # include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
43 # include <boost/mpl/aux_/preprocessor/repeat.hpp>
44 # include <boost/mpl/aux_/preprocessor/ext_params.hpp>
45 # include <boost/mpl/aux_/preprocessor/params.hpp>
46 # include <boost/mpl/aux_/preprocessor/enum.hpp>
47 # include <boost/mpl/aux_/preprocessor/add.hpp>
48 # include <boost/mpl/aux_/preprocessor/sub.hpp>
49 # include <boost/mpl/aux_/config/ctps.hpp>
50 # include <boost/mpl/aux_/config/eti.hpp>
51 # include <boost/mpl/aux_/config/msvc.hpp>
52 # include <boost/mpl/aux_/config/workaround.hpp>
54 # include <boost/preprocessor/dec.hpp>
55 # include <boost/preprocessor/inc.hpp>
56 # include <boost/preprocessor/iterate.hpp>
57 # include <boost/preprocessor/cat.hpp>
60 #if !defined(AUX778076_OP_ARITY)
61 # define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
64 #if !defined(AUX778076_OP_IMPL_NAME)
65 # define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl)
68 #if !defined(AUX778076_OP_TAG_NAME)
69 # define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag)
72 namespace boost { namespace mpl {
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
81 struct AUX778076_OP_IMPL_NAME
86 struct AUX778076_OP_IMPL_NAME
88 ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
89 > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
92 , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag1>,Tag1,Tag2 >
93 , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag2,Tag2>,Tag1,Tag2 >
98 /// for Digital Mars C++/compilers with no CTPS/TTP support
99 template<> struct AUX778076_OP_IMPL_NAME<na,na>
101 template< typename U1, typename U2 > struct apply
104 BOOST_STATIC_CONSTANT(int, value = 0);
108 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
109 template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag>
111 template< typename U1, typename U2 > struct apply
114 BOOST_STATIC_CONSTANT(int, value = 0);
118 template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na>
120 template< typename U1, typename U2 > struct apply
123 BOOST_STATIC_CONSTANT(int, value = 0);
127 template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag>
129 template< typename U1, typename U2 > struct apply
132 BOOST_STATIC_CONSTANT(int, value = 0);
136 template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na>
138 template< typename U1, typename U2 > struct apply
141 BOOST_STATIC_CONSTANT(int, value = 0);
147 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
148 && BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
149 template< typename T > struct AUX778076_OP_TAG_NAME
154 template< typename T > struct AUX778076_OP_TAG_NAME
156 typedef typename T::tag type;
161 #if AUX778076_OP_ARITY != 2
163 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
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 ) \
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)
176 struct AUX778076_OP_NAME
177 : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N)
179 BOOST_MPL_AUX_LAMBDA_SUPPORT(
182 , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
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()
190 # undef AUX778076_OP_N_CALLS
191 # undef AUX778076_OP_RIGHT_OPERAND
193 # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
195 /// forward declaration
197 typename BOOST_MPL_AUX_NA_PARAM(N1)
198 , typename BOOST_MPL_AUX_NA_PARAM(N2)
200 struct BOOST_PP_CAT(AUX778076_OP_NAME,2);
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)
207 struct AUX778076_OP_NAME
208 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
209 : aux::msvc_eti_base< typename if_<
214 , BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
216 BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
217 , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N)
220 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
224 BOOST_MPL_AUX_LAMBDA_SUPPORT(
227 , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
235 struct BOOST_PP_CAT(AUX778076_OP_NAME,2)
239 #else // AUX778076_OP_ARITY == 2
242 typename BOOST_MPL_AUX_NA_PARAM(N1)
243 , typename BOOST_MPL_AUX_NA_PARAM(N2)
245 struct AUX778076_OP_NAME
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
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
265 #if AUX778076_OP_ARITY != 2
267 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
268 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
271 , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) )
274 BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2))
278 BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2))
282 BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME)
286 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
288 ///// iteration, depth == 1
290 #elif BOOST_PP_ITERATION_DEPTH() == 1
292 # define i_ BOOST_PP_FRAME_ITERATION(1)
295 BOOST_MPL_PP_PARAMS(i_, typename N)
297 struct AUX778076_OP_NAME<BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na)>
299 : AUX778076_OP_N_CALLS(i_, N)
301 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
304 , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) )
311 #endif // BOOST_PP_IS_ITERATING