annotate DEPENDENCIES/generic/include/boost/proto/context/detail/preprocessed/default_eval.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 ///////////////////////////////////////////////////////////////////////////////
Chris@16 2 /// \file default_eval.hpp
Chris@16 3 /// Contains specializations of the default_eval\<\> class template.
Chris@16 4 //
Chris@16 5 // Copyright 2008 Eric Niebler. Distributed under the Boost
Chris@16 6 // Software License, Version 1.0. (See accompanying file
Chris@16 7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8 template<typename Expr, typename Context>
Chris@16 9 struct default_eval<Expr, Context, proto::tag::function, 3>
Chris@16 10 {
Chris@16 11 typedef
Chris@16 12 typename proto::detail::result_of_fixup<
Chris@16 13 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 14 >::type
Chris@16 15 function_type;
Chris@16 16 typedef
Chris@16 17 typename BOOST_PROTO_RESULT_OF<
Chris@16 18 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type)
Chris@16 19 >::type
Chris@16 20 result_type;
Chris@16 21 result_type operator ()(Expr &expr, Context &context) const
Chris@16 22 {
Chris@16 23 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 24 }
Chris@16 25 private:
Chris@16 26 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 27 {
Chris@16 28 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 29 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context)
Chris@16 30 );
Chris@16 31 }
Chris@16 32 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 33 {
Chris@16 34 BOOST_PROTO_USE_GET_POINTER();
Chris@16 35 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 36 return (
Chris@16 37 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 38 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 39 )(proto::eval(proto::child_c< 2>( expr), context));
Chris@16 40 }
Chris@16 41 };
Chris@16 42 template<typename Expr, typename Context>
Chris@16 43 struct default_eval<Expr, Context, proto::tag::function, 4>
Chris@16 44 {
Chris@16 45 typedef
Chris@16 46 typename proto::detail::result_of_fixup<
Chris@16 47 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 48 >::type
Chris@16 49 function_type;
Chris@16 50 typedef
Chris@16 51 typename BOOST_PROTO_RESULT_OF<
Chris@16 52 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type)
Chris@16 53 >::type
Chris@16 54 result_type;
Chris@16 55 result_type operator ()(Expr &expr, Context &context) const
Chris@16 56 {
Chris@16 57 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 58 }
Chris@16 59 private:
Chris@16 60 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 61 {
Chris@16 62 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 63 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context)
Chris@16 64 );
Chris@16 65 }
Chris@16 66 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 67 {
Chris@16 68 BOOST_PROTO_USE_GET_POINTER();
Chris@16 69 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 70 return (
Chris@16 71 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 72 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 73 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context));
Chris@16 74 }
Chris@16 75 };
Chris@16 76 template<typename Expr, typename Context>
Chris@16 77 struct default_eval<Expr, Context, proto::tag::function, 5>
Chris@16 78 {
Chris@16 79 typedef
Chris@16 80 typename proto::detail::result_of_fixup<
Chris@16 81 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 82 >::type
Chris@16 83 function_type;
Chris@16 84 typedef
Chris@16 85 typename BOOST_PROTO_RESULT_OF<
Chris@16 86 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type)
Chris@16 87 >::type
Chris@16 88 result_type;
Chris@16 89 result_type operator ()(Expr &expr, Context &context) const
Chris@16 90 {
Chris@16 91 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 92 }
Chris@16 93 private:
Chris@16 94 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 95 {
Chris@16 96 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 97 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context)
Chris@16 98 );
Chris@16 99 }
Chris@16 100 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 101 {
Chris@16 102 BOOST_PROTO_USE_GET_POINTER();
Chris@16 103 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 104 return (
Chris@16 105 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 106 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 107 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context));
Chris@16 108 }
Chris@16 109 };
Chris@16 110 template<typename Expr, typename Context>
Chris@16 111 struct default_eval<Expr, Context, proto::tag::function, 6>
Chris@16 112 {
Chris@16 113 typedef
Chris@16 114 typename proto::detail::result_of_fixup<
Chris@16 115 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 116 >::type
Chris@16 117 function_type;
Chris@16 118 typedef
Chris@16 119 typename BOOST_PROTO_RESULT_OF<
Chris@16 120 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type)
Chris@16 121 >::type
Chris@16 122 result_type;
Chris@16 123 result_type operator ()(Expr &expr, Context &context) const
Chris@16 124 {
Chris@16 125 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 126 }
Chris@16 127 private:
Chris@16 128 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 129 {
Chris@16 130 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 131 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context)
Chris@16 132 );
Chris@16 133 }
Chris@16 134 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 135 {
Chris@16 136 BOOST_PROTO_USE_GET_POINTER();
Chris@16 137 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 138 return (
Chris@16 139 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 140 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 141 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context));
Chris@16 142 }
Chris@16 143 };
Chris@16 144 template<typename Expr, typename Context>
Chris@16 145 struct default_eval<Expr, Context, proto::tag::function, 7>
Chris@16 146 {
Chris@16 147 typedef
Chris@16 148 typename proto::detail::result_of_fixup<
Chris@16 149 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 150 >::type
Chris@16 151 function_type;
Chris@16 152 typedef
Chris@16 153 typename BOOST_PROTO_RESULT_OF<
Chris@16 154 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type)
Chris@16 155 >::type
Chris@16 156 result_type;
Chris@16 157 result_type operator ()(Expr &expr, Context &context) const
Chris@16 158 {
Chris@16 159 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 160 }
Chris@16 161 private:
Chris@16 162 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 163 {
Chris@16 164 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 165 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context)
Chris@16 166 );
Chris@16 167 }
Chris@16 168 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 169 {
Chris@16 170 BOOST_PROTO_USE_GET_POINTER();
Chris@16 171 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 172 return (
Chris@16 173 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 174 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 175 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context));
Chris@16 176 }
Chris@16 177 };
Chris@16 178 template<typename Expr, typename Context>
Chris@16 179 struct default_eval<Expr, Context, proto::tag::function, 8>
Chris@16 180 {
Chris@16 181 typedef
Chris@16 182 typename proto::detail::result_of_fixup<
Chris@16 183 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 184 >::type
Chris@16 185 function_type;
Chris@16 186 typedef
Chris@16 187 typename BOOST_PROTO_RESULT_OF<
Chris@16 188 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type)
Chris@16 189 >::type
Chris@16 190 result_type;
Chris@16 191 result_type operator ()(Expr &expr, Context &context) const
Chris@16 192 {
Chris@16 193 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 194 }
Chris@16 195 private:
Chris@16 196 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 197 {
Chris@16 198 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 199 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context)
Chris@16 200 );
Chris@16 201 }
Chris@16 202 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 203 {
Chris@16 204 BOOST_PROTO_USE_GET_POINTER();
Chris@16 205 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 206 return (
Chris@16 207 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 208 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 209 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context));
Chris@16 210 }
Chris@16 211 };
Chris@16 212 template<typename Expr, typename Context>
Chris@16 213 struct default_eval<Expr, Context, proto::tag::function, 9>
Chris@16 214 {
Chris@16 215 typedef
Chris@16 216 typename proto::detail::result_of_fixup<
Chris@16 217 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 218 >::type
Chris@16 219 function_type;
Chris@16 220 typedef
Chris@16 221 typename BOOST_PROTO_RESULT_OF<
Chris@16 222 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type)
Chris@16 223 >::type
Chris@16 224 result_type;
Chris@16 225 result_type operator ()(Expr &expr, Context &context) const
Chris@16 226 {
Chris@16 227 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 228 }
Chris@16 229 private:
Chris@16 230 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 231 {
Chris@16 232 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 233 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context)
Chris@16 234 );
Chris@16 235 }
Chris@16 236 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 237 {
Chris@16 238 BOOST_PROTO_USE_GET_POINTER();
Chris@16 239 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 240 return (
Chris@16 241 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 242 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 243 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context));
Chris@16 244 }
Chris@16 245 };
Chris@16 246 template<typename Expr, typename Context>
Chris@16 247 struct default_eval<Expr, Context, proto::tag::function, 10>
Chris@16 248 {
Chris@16 249 typedef
Chris@16 250 typename proto::detail::result_of_fixup<
Chris@16 251 typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
Chris@16 252 >::type
Chris@16 253 function_type;
Chris@16 254 typedef
Chris@16 255 typename BOOST_PROTO_RESULT_OF<
Chris@16 256 function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 9>::type >::type , Context >::type)
Chris@16 257 >::type
Chris@16 258 result_type;
Chris@16 259 result_type operator ()(Expr &expr, Context &context) const
Chris@16 260 {
Chris@16 261 return this->invoke(expr, context, is_member_function_pointer<function_type>());
Chris@16 262 }
Chris@16 263 private:
Chris@16 264 result_type invoke(Expr &expr, Context &context, mpl::false_) const
Chris@16 265 {
Chris@16 266 return proto::eval(proto::child_c< 0>( expr), context)(
Chris@16 267 proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context)
Chris@16 268 );
Chris@16 269 }
Chris@16 270 result_type invoke(Expr &expr, Context &context, mpl::true_) const
Chris@16 271 {
Chris@16 272 BOOST_PROTO_USE_GET_POINTER();
Chris@16 273 typedef typename detail::class_member_traits<function_type>::class_type class_type;
Chris@16 274 return (
Chris@16 275 BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->*
Chris@16 276 proto::eval(proto::child_c< 0>( expr), context)
Chris@16 277 )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context));
Chris@16 278 }
Chris@16 279 };