lambda_no_ctps.hpp
Go to the documentation of this file.
1 
2 #if !defined(BOOST_PP_IS_ITERATING)
3 
5 
6 #ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
7 #define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
8 
9 // Copyright Aleksey Gurtovoy 2000-2004
10 //
11 // Distributed under the Boost Software License, Version 1.0.
12 // (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14 //
15 // See http://www.boost.org/libs/mpl for documentation.
16 
17 // $Id: lambda_no_ctps.hpp 13472 2017-08-22 07:53:44Z richean $
18 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
19 // $Revision: 13472 $
20 
21 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
22 # include <boost/mpl/lambda_fwd.hpp>
23 # include <boost/mpl/bind_fwd.hpp>
24 # include <boost/mpl/protect.hpp>
26 # include <boost/mpl/if.hpp>
27 # include <boost/mpl/identity.hpp>
28 # include <boost/mpl/bool.hpp>
33 #endif
34 
36 
37 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
38  && !defined(BOOST_MPL_PREPROCESSING_MODE)
39 
40 # define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp
42 
43 #else
44 
52 
57 
58 namespace boost { namespace mpl {
59 
60 # define AUX778076_LAMBDA_PARAMS(i_, param) \
61  BOOST_MPL_PP_PARAMS(i_, param) \
62 
63 
64 namespace aux {
65 
66 #define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY
67 template<
68  BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false)
69  >
70 struct lambda_or
71  : true_
72 {
73 };
74 
75 template<>
76 struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) >
77  : false_
78 {
79 };
80 #undef n_
81 
82 template< typename Arity > struct lambda_impl
83 {
84  template< typename T, typename Tag, typename Protect > struct result_
85  {
86  typedef T type;
87  typedef is_placeholder<T> is_le;
88  };
89 };
90 
91 #define BOOST_PP_ITERATION_PARAMS_1 \
92  (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/lambda_no_ctps.hpp>))
93 #include BOOST_PP_ITERATE()
94 
95 } // namespace aux
96 
97 template<
98  typename T
99  , typename Tag
100  , typename Protect
101  >
102 struct lambda
103 {
105  typedef typename aux::template_arity<T>::type arity_;
106  typedef typename aux::lambda_impl<arity_>
107  ::template result_< T,Tag,Protect > l_;
108 
109  typedef typename l_::type type;
110  typedef typename l_::is_le is_le;
111 
112  BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
113 };
114 
115 BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
116 
117 template<
118  typename T
119  >
120 struct is_lambda_expression
121  : lambda<T>::is_le
122 {
123 };
124 
125 # undef AUX778076_LAMBDA_PARAMS
126 
127 }}
128 
129 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
130 #endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED
131 
133 
134 #else
135 
136 #define i_ BOOST_PP_FRAME_ITERATION(1)
137 
138 # define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \
139  typedef lambda< \
140  typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \
141  , Tag \
142  , false_ \
143  > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \
144 
145 
146 # define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \
147  typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \
148  BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \
149 
150 
151 # define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \
152  BOOST_PP_COMMA_IF(i_) \
153  BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \
154 
155 
156 # define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \
157  , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \
158 
159 
160 template<> struct lambda_impl< int_<i_> >
161 {
162  template< typename F, typename Tag, typename Protect > struct result_
163  {
164  BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F)
165  BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused)
166 
167  typedef aux::lambda_or<
168  BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused)
169  > is_le;
170 
171  typedef BOOST_PP_CAT(bind,i_)<
172  typename F::rebind
173  BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused)
174  > bind_;
175 
176  typedef typename if_<
177  is_le
178  , if_< Protect, mpl::protect<bind_>, bind_ >
179  , identity<F>
180  >::type type_;
181 
182  typedef typename type_::type type;
183  };
184 };
185 
186 # undef AUX778076_LAMBDA_RESULT
187 # undef AUX778076_IS_LAMBDA_EXPR
188 # undef AUX778076_IS_LE_TYPEDEF
189 # undef AUX778076_LAMBDA_TYPEDEF
190 
191 #undef i_
192 
193 #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
template_arity.hpp
identity.hpp
T
T
Definition: mem_fn_cc.hpp:25
use_preprocessed.hpp
BOOST_MPL_PP_REPEAT
#define BOOST_MPL_PP_REPEAT(n, f, param)
Definition: mpl/aux_/preprocessor/repeat.hpp:23
na_spec.hpp
value_wknd.hpp
bool.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
arity.hpp
is_placeholder.hpp
lambda_fwd.hpp
cat.hpp
boost::mpl::aux::lambda_impl::result_::type
T type
Definition: preprocessed/bcc/lambda_no_ctps.hpp:35
BOOST_MPL_AUX_LAMBDA_SUPPORT
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params)
Definition: lambda_support.hpp:22
default_params.hpp
boost::mpl::aux::lambda_impl::result_::is_le
is_placeholder< T > is_le
Definition: preprocessed/bcc/lambda_no_ctps.hpp:36
workaround.hpp
inc.hpp
msvc.hpp
boost::mpl::aux::template_arity::type
mpl::int_< value > type
Definition: preprocessed/gcc/template_arity.hpp:94
include_preprocessed.hpp
repeat.hpp
params.hpp
boost::mpl::lambda::l_
aux::lambda_impl< arity_ >::template result_< T, Tag, Protect > l_
Definition: preprocessed/bcc/lambda_no_ctps.hpp:211
comma_if.hpp
boost::mpl::lambda::type
T type
Definition: preprocessed/bcc/full_lambda.hpp:42
BOOST_MPL_PP_ENUM
#define BOOST_MPL_PP_ENUM(n, param)
Definition: mpl/aux_/preprocessor/enum.hpp:28
int_
Definition: int_fwd.hpp:22
boost::mpl::lambda::is_le
false_ is_le
Definition: preprocessed/bcc/full_lambda.hpp:40
bind_fwd.hpp
enum.hpp
BOOST_MPL_PP_DEFAULT_PARAMS
#define BOOST_MPL_PP_DEFAULT_PARAMS(n, p, v)
Definition: default_params.hpp:28
bool_< true >
lambda_support.hpp
if.hpp
boost::mpl::lambda::arity_
aux::template_arity< T >::type arity_
Metafunction forwarding confuses MSVC 6.x.
Definition: preprocessed/bcc/lambda_no_ctps.hpp:209
protect.hpp
iterate.hpp


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