annotate DEPENDENCIES/generic/include/boost/fusion/algorithm/iteration/detail/fold.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 c530137014c0
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Copyright (c) 2001-2011 Joel de Guzman
Chris@16 3 Copyright (c) 2006 Dan Marsden
Chris@16 4 Copyright (c) 2009-2010 Christopher Schmidt
Chris@16 5
Chris@16 6 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8 ==============================================================================*/
Chris@16 9 #include <boost/preprocessor/cat.hpp>
Chris@16 10
Chris@16 11 #ifdef BOOST_FUSION_REVERSE_FOLD
Chris@16 12 # ifdef BOOST_FUSION_ITER_FOLD
Chris@16 13 # define BOOST_FUSION_FOLD_NAME reverse_iter_fold
Chris@16 14 # else
Chris@16 15 # define BOOST_FUSION_FOLD_NAME reverse_fold
Chris@16 16 # endif
Chris@16 17
Chris@16 18 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION end
Chris@16 19 # define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION prior
Chris@16 20 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) \
Chris@16 21 typename fusion::result_of::prior<IT>::type
Chris@16 22 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) fusion::prior(IT)
Chris@16 23 #else
Chris@16 24 # ifdef BOOST_FUSION_ITER_FOLD
Chris@16 25 # define BOOST_FUSION_FOLD_NAME iter_fold
Chris@16 26 # else
Chris@16 27 # define BOOST_FUSION_FOLD_NAME fold
Chris@16 28 # endif
Chris@16 29
Chris@16 30 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION begin
Chris@16 31 # define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION next
Chris@16 32 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) IT
Chris@16 33 # define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) IT
Chris@16 34 #endif
Chris@16 35 #ifdef BOOST_FUSION_ITER_FOLD
Chris@16 36 # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) IT&
Chris@16 37 # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) IT
Chris@16 38 #else
Chris@16 39 # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) \
Chris@16 40 typename fusion::result_of::deref<IT>::type
Chris@16 41 # define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT)
Chris@16 42 #endif
Chris@16 43
Chris@16 44 namespace boost { namespace fusion
Chris@16 45 {
Chris@16 46 namespace detail
Chris@16 47 {
Chris@16 48 template<typename State, typename It, typename F>
Chris@16 49 struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)
Chris@101 50 : fusion::detail::result_of_with_decltype<
Chris@16 51 F(
Chris@16 52 typename add_reference<typename add_const<State>::type>::type,
Chris@16 53 BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It))
Chris@16 54 >
Chris@16 55 {};
Chris@16 56
Chris@16 57 template<typename Result,int N>
Chris@16 58 struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)
Chris@16 59 {
Chris@101 60 template<typename State3, typename It3, typename F>
Chris@101 61 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 62 static Result
Chris@101 63 call_3(State3 const& state3,It3 const& it3,F& f)
Chris@16 64 {
Chris@16 65 return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 66 Result
Chris@16 67 , N-4
Chris@16 68 >::call(
Chris@16 69 f(state3,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)),
Chris@16 70 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3),
Chris@16 71 f);
Chris@16 72 }
Chris@101 73
Chris@101 74 template<typename State2, typename It2, typename F>
Chris@101 75 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 76 static Result
Chris@101 77 call_2(State2 const& state2,It2 const& it2,F& f)
Chris@101 78 {
Chris@101 79 return call_3(
Chris@101 80 f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2)),
Chris@101 81 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2),
Chris@101 82 f);
Chris@101 83 }
Chris@101 84
Chris@101 85 template<typename State1, typename It1, typename F>
Chris@101 86 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 87 static Result
Chris@101 88 call_1(State1 const& state1,It1 const& it1,F& f)
Chris@101 89 {
Chris@101 90 return call_2(
Chris@101 91 f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)),
Chris@101 92 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1),
Chris@101 93 f);
Chris@101 94 }
Chris@101 95
Chris@101 96 template<typename State, typename It0, typename F>
Chris@101 97 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 98 static Result
Chris@101 99 call(State const& state,It0 const& it0,F f)
Chris@101 100 {
Chris@101 101 return call_1(
Chris@101 102 f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)),
Chris@101 103 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0),
Chris@101 104 f);
Chris@101 105 }
Chris@16 106 };
Chris@16 107
Chris@16 108 template<typename Result>
Chris@16 109 struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,3>
Chris@16 110 {
Chris@101 111 template<typename State2, typename It2, typename F>
Chris@101 112 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 113 static Result
Chris@101 114 call_2(State2 const& state2,It2 const& it2,F& f)
Chris@101 115 {
Chris@101 116 return f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
Chris@101 117 }
Chris@101 118
Chris@101 119 template<typename State1, typename It1, typename F>
Chris@101 120 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 121 static Result
Chris@101 122 call_1(State1 const& state1,It1 const& it1,F& f)
Chris@101 123 {
Chris@101 124 return call_2(
Chris@101 125 f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)),
Chris@101 126 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1),
Chris@101 127 f);
Chris@101 128 }
Chris@101 129
Chris@16 130 template<typename State, typename It0, typename F>
Chris@101 131 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 132 static Result
Chris@16 133 call(State const& state,It0 const& it0,F f)
Chris@16 134 {
Chris@101 135 return call_1(
Chris@101 136 f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)),
Chris@101 137 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0),
Chris@101 138 f);
Chris@16 139 }
Chris@16 140 };
Chris@16 141
Chris@16 142 template<typename Result>
Chris@16 143 struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,2>
Chris@16 144 {
Chris@101 145 template<typename State1, typename It1, typename F>
Chris@101 146 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@101 147 static Result
Chris@101 148 call_1(State1 const& state1,It1 const& it1,F& f)
Chris@101 149 {
Chris@101 150 return f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));
Chris@101 151 }
Chris@101 152
Chris@16 153 template<typename State, typename It0, typename F>
Chris@101 154 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 155 static Result
Chris@16 156 call(State const& state,It0 const& it0,F f)
Chris@16 157 {
Chris@101 158 return call_1(
Chris@101 159 f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)),
Chris@101 160 fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0),
Chris@101 161 f);
Chris@16 162 }
Chris@16 163 };
Chris@16 164
Chris@16 165 template<typename Result>
Chris@16 166 struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,1>
Chris@16 167 {
Chris@16 168 template<typename State, typename It0, typename F>
Chris@101 169 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 170 static Result
Chris@16 171 call(State const& state,It0 const& it0,F f)
Chris@16 172 {
Chris@16 173 return f(state,
Chris@16 174 BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
Chris@16 175 }
Chris@16 176 };
Chris@16 177
Chris@16 178 template<typename Result>
Chris@16 179 struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,0>
Chris@16 180 {
Chris@16 181 template<typename State, typename It0, typename F>
Chris@101 182 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 183 static Result
Chris@101 184 call(State const& state,It0 const&, F)
Chris@16 185 {
Chris@16 186 return static_cast<Result>(state);
Chris@16 187 }
Chris@16 188 };
Chris@16 189
Chris@16 190 template<typename StateRef, typename It0, typename F, int N>
Chris@16 191 struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)
Chris@16 192 {
Chris@16 193 typedef typename
Chris@16 194 BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 195 StateRef
Chris@16 196 , It0 const
Chris@16 197 , F
Chris@16 198 >::type
Chris@16 199 rest1;
Chris@16 200 typedef typename
Chris@16 201 result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 202 It0 const
Chris@16 203 >::type
Chris@16 204 it1;
Chris@16 205 typedef typename
Chris@16 206 BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 207 rest1
Chris@16 208 , it1
Chris@16 209 , F
Chris@16 210 >::type
Chris@16 211 rest2;
Chris@16 212 typedef typename
Chris@16 213 result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it1>::type
Chris@16 214 it2;
Chris@16 215 typedef typename
Chris@16 216 BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 217 rest2
Chris@16 218 , it2
Chris@16 219 , F
Chris@16 220 >::type
Chris@16 221 rest3;
Chris@16 222 typedef typename
Chris@16 223 result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it2>::type
Chris@16 224 it3;
Chris@16 225
Chris@16 226 typedef typename
Chris@16 227 BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 228 typename BOOST_PP_CAT(
Chris@16 229 BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 230 rest3
Chris@16 231 , it3
Chris@16 232 , F
Chris@16 233 >::type
Chris@16 234 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 235 it3
Chris@16 236 >::type
Chris@16 237 , F
Chris@16 238 , N-4
Chris@16 239 >::type
Chris@16 240 type;
Chris@16 241 };
Chris@16 242
Chris@16 243 template<typename StateRef, typename It0, typename F>
Chris@16 244 struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 245 StateRef
Chris@16 246 , It0
Chris@16 247 , F
Chris@16 248 , 3
Chris@16 249 >
Chris@16 250 {
Chris@16 251 typedef typename
Chris@16 252 BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 253 StateRef
Chris@16 254 , It0 const
Chris@16 255 , F
Chris@16 256 >::type
Chris@16 257 rest1;
Chris@16 258 typedef typename
Chris@16 259 result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 260 It0 const
Chris@16 261 >::type
Chris@16 262 it1;
Chris@16 263
Chris@16 264 typedef typename
Chris@16 265 BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 266 typename BOOST_PP_CAT(
Chris@16 267 BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 268 rest1
Chris@16 269 , it1
Chris@16 270 , F
Chris@16 271 >::type
Chris@16 272 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 273 it1 const
Chris@16 274 >::type const
Chris@16 275 , F
Chris@16 276 >::type
Chris@16 277 type;
Chris@16 278 };
Chris@16 279
Chris@16 280 template<typename StateRef, typename It0, typename F>
Chris@16 281 struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 282 StateRef
Chris@16 283 , It0
Chris@16 284 , F
Chris@16 285 , 2
Chris@16 286 >
Chris@16 287 : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 288 typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 289 StateRef
Chris@16 290 , It0 const
Chris@16 291 , F
Chris@16 292 >::type
Chris@16 293 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 294 It0 const
Chris@16 295 >::type const
Chris@16 296 , F
Chris@16 297 >
Chris@16 298 {};
Chris@16 299
Chris@16 300 template<typename StateRef, typename It0, typename F>
Chris@16 301 struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 302 StateRef
Chris@16 303 , It0
Chris@16 304 , F
Chris@16 305 , 1
Chris@16 306 >
Chris@16 307 : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
Chris@16 308 StateRef
Chris@16 309 , It0 const
Chris@16 310 , F
Chris@16 311 >
Chris@16 312 {};
Chris@16 313
Chris@16 314 template<typename StateRef, typename It0, typename F>
Chris@16 315 struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 316 StateRef
Chris@16 317 , It0
Chris@16 318 , F
Chris@16 319 , 0
Chris@16 320 >
Chris@16 321 {
Chris@16 322 typedef StateRef type;
Chris@16 323 };
Chris@16 324
Chris@16 325 template<typename StateRef, typename It0, typename F, int SeqSize>
Chris@16 326 struct BOOST_PP_CAT(result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)
Chris@16 327 {
Chris@16 328 typedef typename
Chris@16 329 BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@101 330 typename fusion::detail::result_of_with_decltype<
Chris@16 331 F(
Chris@16 332 StateRef,
Chris@16 333 BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(
Chris@16 334 It0 const)
Chris@16 335 )
Chris@16 336 >::type
Chris@16 337 , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
Chris@16 338 It0 const
Chris@16 339 >::type
Chris@16 340 , F
Chris@16 341 , SeqSize-1
Chris@16 342 >::type
Chris@16 343 type;
Chris@16 344 };
Chris@16 345
Chris@16 346 template<int SeqSize, typename StateRef, typename Seq, typename F>
Chris@16 347 struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)
Chris@16 348 {
Chris@16 349 typedef typename
Chris@16 350 BOOST_PP_CAT(
Chris@16 351 result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)<
Chris@16 352 StateRef
Chris@16 353 , BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(
Chris@16 354 typename result_of::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
Chris@16 355 )
Chris@16 356 , F
Chris@16 357 , SeqSize
Chris@16 358 >::type
Chris@16 359 type;
Chris@16 360
Chris@101 361 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 362 static type
Chris@16 363 call(StateRef state, Seq& seq, F f)
Chris@16 364 {
Chris@16 365 typedef
Chris@16 366 BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
Chris@16 367 type
Chris@16 368 , SeqSize
Chris@16 369 >
Chris@16 370 unrolled_impl;
Chris@16 371
Chris@16 372 return unrolled_impl::call(
Chris@16 373 state,
Chris@16 374 BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(
Chris@16 375 fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq)),
Chris@16 376 f);
Chris@16 377 }
Chris@16 378 };
Chris@16 379
Chris@16 380 template<typename StateRef, typename Seq, typename F>
Chris@16 381 struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<0,StateRef,Seq,F>
Chris@16 382 {
Chris@16 383 typedef StateRef type;
Chris@16 384
Chris@101 385 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 386 static StateRef
Chris@16 387 call(StateRef state, Seq&, F)
Chris@16 388 {
Chris@16 389 return static_cast<StateRef>(state);
Chris@16 390 }
Chris@16 391 };
Chris@16 392
Chris@16 393 template<typename Seq, typename State, typename F, bool IsSegmented>
Chris@16 394 struct BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)
Chris@16 395 : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<
Chris@16 396 result_of::size<Seq>::value
Chris@16 397 , typename add_reference<
Chris@16 398 typename add_const<State>::type
Chris@16 399 >::type
Chris@16 400 , Seq
Chris@16 401 , F
Chris@16 402 >
Chris@16 403 {};
Chris@16 404 }
Chris@16 405
Chris@16 406 namespace result_of
Chris@16 407 {
Chris@16 408 template<typename Seq, typename State, typename F>
Chris@16 409 struct BOOST_FUSION_FOLD_NAME
Chris@16 410 : detail::BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)<
Chris@16 411 Seq
Chris@16 412 , State
Chris@16 413 , F
Chris@16 414 , traits::is_segmented<Seq>::type::value
Chris@16 415 >
Chris@16 416 {};
Chris@16 417 }
Chris@16 418
Chris@16 419 template<typename Seq, typename State, typename F>
Chris@101 420 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 421 inline typename result_of::BOOST_FUSION_FOLD_NAME<
Chris@16 422 Seq
Chris@16 423 , State const
Chris@16 424 , F
Chris@16 425 >::type
Chris@16 426 BOOST_FUSION_FOLD_NAME(Seq& seq, State const& state, F f)
Chris@16 427 {
Chris@16 428 return result_of::BOOST_FUSION_FOLD_NAME<Seq,State const,F>::call(
Chris@16 429 state,
Chris@16 430 seq,
Chris@16 431 f);
Chris@16 432 }
Chris@16 433
Chris@16 434 template<typename Seq, typename State, typename F>
Chris@101 435 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 436 inline typename result_of::BOOST_FUSION_FOLD_NAME<
Chris@16 437 Seq const
Chris@16 438 , State const
Chris@16 439 , F
Chris@16 440 >::type
Chris@16 441 BOOST_FUSION_FOLD_NAME(Seq const& seq, State const& state, F f)
Chris@16 442 {
Chris@16 443 return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State const,F>::call(
Chris@16 444 state,
Chris@16 445 seq,
Chris@16 446 f);
Chris@16 447 }
Chris@16 448
Chris@16 449 template<typename Seq, typename State, typename F>
Chris@101 450 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 451 inline typename result_of::BOOST_FUSION_FOLD_NAME<
Chris@16 452 Seq
Chris@16 453 , State const
Chris@16 454 , F
Chris@16 455 >::type
Chris@16 456 BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
Chris@16 457 {
Chris@16 458 return result_of::BOOST_FUSION_FOLD_NAME<Seq,State,F>::call(
Chris@16 459 state,
Chris@16 460 seq,
Chris@16 461 f);
Chris@16 462 }
Chris@16 463
Chris@16 464 template<typename Seq, typename State, typename F>
Chris@101 465 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Chris@16 466 inline typename result_of::BOOST_FUSION_FOLD_NAME<
Chris@16 467 Seq const
Chris@16 468 , State const
Chris@16 469 , F
Chris@16 470 >::type
Chris@16 471 BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
Chris@16 472 {
Chris@16 473 return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State,F>::call(
Chris@16 474 state,
Chris@16 475 seq,
Chris@16 476 f);
Chris@16 477 }
Chris@16 478 }}
Chris@16 479
Chris@16 480 #undef BOOST_FUSION_FOLD_NAME
Chris@16 481 #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION
Chris@16 482 #undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION
Chris@16 483 #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM
Chris@16 484 #undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM
Chris@16 485 #undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM
Chris@16 486 #undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM