transform.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED
3 #define BOOST_MPL_TRANSFORM_HPP_INCLUDED
4 
5 // Copyright Aleksey Gurtovoy 2000-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: transform.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 
18 #include <boost/mpl/fold.hpp>
20 #include <boost/mpl/pair_view.hpp>
22 #include <boost/mpl/eval_if.hpp>
23 #include <boost/mpl/lambda.hpp>
24 #include <boost/mpl/bind.hpp>
25 #include <boost/mpl/or.hpp>
26 #include <boost/mpl/not.hpp>
27 #include <boost/mpl/aux_/na.hpp>
29 
30 namespace boost { namespace mpl {
31 
32 namespace aux {
33 
34 template<
35  typename Seq
36  , typename Op
37  , typename In
38  >
40  : fold<
41  Seq
42  , typename In::state
43  , bind2< typename lambda< typename In::operation >::type
44  , _1
45  , bind1< typename lambda<Op>::type, _2>
46  >
47  >
48 {
49 };
50 
51 template<
52  typename Seq
53  , typename Op
54  , typename In
55  >
57  : reverse_fold<
58  Seq
59  , typename In::state
60  , bind2< typename lambda< typename In::operation >::type
61  , _1
62  , bind1< typename lambda<Op>::type, _2>
63  >
64  >
65 {
66 };
67 
68 template<
69  typename Seq1
70  , typename Seq2
71  , typename Op
72  , typename In
73  >
75  : fold<
76  pair_view<Seq1,Seq2>
77  , typename In::state
78  , bind2< typename lambda< typename In::operation >::type
79  , _1
80  , bind2<
81  typename lambda<Op>::type
82  , bind1<first<>,_2>
83  , bind1<second<>,_2>
84  >
85  >
86  >
87 {
88 };
89 
90 template<
91  typename Seq1
92  , typename Seq2
93  , typename Op
94  , typename In
95  >
97  : reverse_fold<
98  pair_view<Seq1,Seq2>
99  , typename In::state
100  , bind2< typename lambda< typename In::operation >::type
101  , _1
102  , bind2< typename lambda< Op >::type
103  , bind1<first<>,_2>
104  , bind1<second<>,_2>
105  >
106  >
107  >
108 {
109 };
110 
111 } // namespace aux
112 
115 
116 #define AUX778076_TRANSFORM_DEF(name) \
117 template< \
118  typename BOOST_MPL_AUX_NA_PARAM(Seq1) \
119  , typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation) \
120  , typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter) \
121  , typename BOOST_MPL_AUX_NA_PARAM(Inserter) \
122  > \
123 struct name \
124 { \
125  typedef typename eval_if< \
126  or_< \
127  is_na<OperationOrInserter> \
128  , is_lambda_expression< Seq2OrOperation > \
129  , not_< is_sequence<Seq2OrOperation> > \
130  > \
131  , name##1<Seq1,Seq2OrOperation,OperationOrInserter> \
132  , name##2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> \
133  >::type type; \
134 }; \
135 BOOST_MPL_AUX_NA_SPEC(4, name) \
136 
137 
138 AUX778076_TRANSFORM_DEF(transform)
139 AUX778076_TRANSFORM_DEF(reverse_transform)
140 
141 #undef AUX778076_TRANSFORM_DEF
142 
143 }}
144 
145 #endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED
lambda.hpp
boost::mpl::fold
Definition: fold.hpp:31
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF
#define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name)
Definition: inserter_algorithm.hpp:38
boost::mpl::aux::transform2_impl
Definition: transform.hpp:74
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
na.hpp
inserter_algorithm.hpp
AUX778076_TRANSFORM_DEF
#define AUX778076_TRANSFORM_DEF(name)
Definition: transform.hpp:116
boost::mpl::aux::transform1_impl
Definition: transform.hpp:39
is_sequence.hpp
eval_if.hpp
boost::mpl::aux::reverse_transform1_impl
Definition: transform.hpp:56
fold.hpp
reverse_fold.hpp
pair_view.hpp
not.hpp
bind.hpp
or.hpp
boost::mpl::reverse_fold
Definition: reverse_fold.hpp:32
boost::mpl::aux::reverse_transform2_impl
Definition: transform.hpp:96


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