Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 #ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
3 #define BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2003-2004
6 // Copyright David Abrahams 2003-2004
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // See http://www.boost.org/libs/mpl for documentation.
14 // $Source: /cvsroot/boost/boost/boost/mpl/aux_/inserter_algorithm.hpp,v $
15 // $Date: 2004/09/02 15:40:43 $
18 #include <boost/mpl/back_inserter.hpp>
19 #include <boost/mpl/front_inserter.hpp>
20 #include <boost/mpl/push_back.hpp>
21 #include <boost/mpl/push_front.hpp>
22 #include <boost/mpl/back_inserter.hpp>
23 #include <boost/mpl/front_inserter.hpp>
24 #include <boost/mpl/clear.hpp>
25 #include <boost/mpl/eval_if.hpp>
26 #include <boost/mpl/if.hpp>
27 #include <boost/mpl/aux_/na.hpp>
28 #include <boost/mpl/aux_/common_name_wknd.hpp>
29 #include <boost/mpl/aux_/na_spec.hpp>
30 #include <boost/mpl/aux_/preprocessor/params.hpp>
31 #include <boost/mpl/aux_/preprocessor/default_params.hpp>
32 #include <boost/mpl/aux_/config/ctps.hpp>
34 #include <boost/preprocessor/arithmetic/dec.hpp>
36 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
38 # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
39 BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
41 BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
44 : aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
49 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
51 struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
52 : if_< has_push_back<P1> \
54 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
55 , back_inserter< typename clear<P1>::type > \
57 , aux::reverse_##name##_impl< \
58 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
59 , front_inserter< typename clear<P1>::type > \
66 BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
68 struct reverse_##name \
69 : aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
74 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
76 struct reverse_##name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
77 : if_< has_push_back<P1> \
78 , aux::reverse_##name##_impl< \
79 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
80 , back_inserter< typename clear<P1>::type > \
83 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
84 , front_inserter< typename clear<P1>::type > \
89 BOOST_MPL_AUX_NA_SPEC(arity, name) \
90 BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
95 # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
96 BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
98 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
100 struct def_##name##_impl \
101 : if_< has_push_back<P1> \
102 , aux::name##_impl< \
103 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
104 , back_inserter< typename clear<P1>::type > \
106 , aux::reverse_##name##_impl< \
107 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
108 , front_inserter< typename clear<P1>::type > \
115 BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
119 typedef typename eval_if< \
120 is_na<BOOST_PP_CAT(P, arity)> \
121 , def_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
122 , aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
127 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
129 struct def_reverse_##name##_impl \
130 : if_< has_push_back<P1> \
131 , aux::reverse_##name##_impl< \
132 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
133 , back_inserter< typename clear<P1>::type > \
135 , aux::name##_impl< \
136 BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
137 , front_inserter< typename clear<P1>::type > \
143 BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
145 struct reverse_##name \
147 typedef typename eval_if< \
148 is_na<BOOST_PP_CAT(P, arity)> \
149 , def_reverse_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \
150 , aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
153 BOOST_MPL_AUX_NA_SPEC(arity, name) \
154 BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
157 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
159 #endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED