inserter_algorithm.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
3 #define BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
4 
5 // Copyright Aleksey Gurtovoy 2003-2004
6 // Copyright David Abrahams 2003-2004
7 //
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)
11 //
12 // See http://www.boost.org/libs/mpl for documentation.
13 
14 // $Id: inserter_algorithm.hpp 13472 2017-08-22 07:53:44Z richean $
15 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
16 // $Revision: 13472 $
17 
20 #include <boost/mpl/push_back.hpp>
21 #include <boost/mpl/push_front.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>
33 
35 
36 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
37 
38 # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
39 BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
40 template< \
41  BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
42  > \
43 struct name \
44  : aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
45 { \
46 }; \
47 \
48 template< \
49  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
50  > \
51 struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \
52  : if_< has_push_back< typename clear<P1>::type> \
53  , aux::name##_impl< \
54  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
55  , back_inserter< typename clear<P1>::type > \
56  > \
57  , aux::reverse_##name##_impl< \
58  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
59  , front_inserter< typename clear<P1>::type > \
60  > \
61  >::type \
62 { \
63 }; \
64 \
65 template< \
66  BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
67  > \
68 struct reverse_##name \
69  : aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \
70 { \
71 }; \
72 \
73 template< \
74  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
75  > \
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 > \
81  > \
82  , aux::name##_impl< \
83  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
84  , front_inserter< typename clear<P1>::type > \
85  > \
86  >::type \
87 { \
88 }; \
89 BOOST_MPL_AUX_NA_SPEC(arity, name) \
90 BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
91 
92 
93 #else
94 
95 # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \
96 BOOST_MPL_AUX_COMMON_NAME_WKND(name) \
97 template< \
98  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
99  > \
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 > \
105  > \
106  , aux::reverse_##name##_impl< \
107  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
108  , front_inserter< typename clear<P1>::type > \
109  > \
110  >::type \
111 { \
112 }; \
113 \
114 template< \
115  BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
116  > \
117 struct name \
118 { \
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)> \
123  >::type type; \
124 }; \
125 \
126 template< \
127  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \
128  > \
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 > \
134  > \
135  , aux::name##_impl< \
136  BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \
137  , front_inserter< typename clear<P1>::type > \
138  > \
139  >::type \
140 { \
141 }; \
142 template< \
143  BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \
144  > \
145 struct reverse_##name \
146 { \
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)> \
151  >::type type; \
152 }; \
153 BOOST_MPL_AUX_NA_SPEC(arity, name) \
154 BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \
155 
156 
157 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
158 
159 #endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED
ctps.hpp
na_spec.hpp
dec.hpp
common_name_wknd.hpp
push_front.hpp
na.hpp
default_params.hpp
back_inserter.hpp
params.hpp
front_inserter.hpp
eval_if.hpp
clear.hpp
if.hpp
push_back.hpp


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