BVB Source Codes

mars Show iter_fold_impl.hpp Source code

Return Download mars: download iter_fold_impl.hpp Source code - Download mars Source code - Type:.hpp
  1.  
  2. // Copyright Aleksey Gurtovoy 2000-2004
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8.  
  9. // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
  10. // -- DO NOT modify by hand!
  11.  
  12. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace mpl { namespace aux {
  13.  
  14. /// forward declaration
  15.  
  16. template<
  17.       int N
  18.     , typename First
  19.     , typename Last
  20.     , typename State
  21.     , typename ForwardOp
  22.     >
  23. struct iter_fold_impl;
  24.  
  25. template< int N >
  26. struct iter_fold_chunk;
  27.  
  28. template<> struct iter_fold_chunk<0>
  29. {
  30.     template<
  31.           typename First
  32.         , typename Last
  33.         , typename State
  34.         , typename ForwardOp
  35.         >
  36.     struct result_
  37.     {
  38.         typedef First iter0;
  39.         typedef State state0;
  40.         typedef state0 state;
  41.         typedef iter0 iterator;
  42.     };
  43.  
  44.     /// ETI workaround
  45.     template<> struct result_< int,int,int,int >
  46.     {
  47.         typedef int state;
  48.         typedef int iterator;
  49.     };
  50.  
  51. };
  52.  
  53. template<> struct iter_fold_chunk<1>
  54. {
  55.     template<
  56.           typename First
  57.         , typename Last
  58.         , typename State
  59.         , typename ForwardOp
  60.         >
  61.     struct result_
  62.     {
  63.         typedef First iter0;
  64.         typedef State state0;
  65.         typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
  66.         typedef typename mpl::next<iter0>::type iter1;
  67.        
  68.  
  69.         typedef state1 state;
  70.         typedef iter1 iterator;
  71.     };
  72.  
  73.     /// ETI workaround
  74.     template<> struct result_< int,int,int,int >
  75.     {
  76.         typedef int state;
  77.         typedef int iterator;
  78.     };
  79.  
  80. };
  81.  
  82. template<> struct iter_fold_chunk<2>
  83. {
  84.     template<
  85.           typename First
  86.         , typename Last
  87.         , typename State
  88.         , typename ForwardOp
  89.         >
  90.     struct result_
  91.     {
  92.         typedef First iter0;
  93.         typedef State state0;
  94.         typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
  95.         typedef typename mpl::next<iter0>::type iter1;
  96.         typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
  97.         typedef typename mpl::next<iter1>::type iter2;
  98.        
  99.  
  100.         typedef state2 state;
  101.         typedef iter2 iterator;
  102.     };
  103.  
  104.     /// ETI workaround
  105.     template<> struct result_< int,int,int,int >
  106.     {
  107.         typedef int state;
  108.         typedef int iterator;
  109.     };
  110.  
  111. };
  112.  
  113. template<> struct iter_fold_chunk<3>
  114. {
  115.     template<
  116.           typename First
  117.         , typename Last
  118.         , typename State
  119.         , typename ForwardOp
  120.         >
  121.     struct result_
  122.     {
  123.         typedef First iter0;
  124.         typedef State state0;
  125.         typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
  126.         typedef typename mpl::next<iter0>::type iter1;
  127.         typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
  128.         typedef typename mpl::next<iter1>::type iter2;
  129.         typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
  130.         typedef typename mpl::next<iter2>::type iter3;
  131.        
  132.  
  133.         typedef state3 state;
  134.         typedef iter3 iterator;
  135.     };
  136.  
  137.     /// ETI workaround
  138.     template<> struct result_< int,int,int,int >
  139.     {
  140.         typedef int state;
  141.         typedef int iterator;
  142.     };
  143.  
  144. };
  145.  
  146. template<> struct iter_fold_chunk<4>
  147. {
  148.     template<
  149.           typename First
  150.         , typename Last
  151.         , typename State
  152.         , typename ForwardOp
  153.         >
  154.     struct result_
  155.     {
  156.         typedef First iter0;
  157.         typedef State state0;
  158.         typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
  159.         typedef typename mpl::next<iter0>::type iter1;
  160.         typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
  161.         typedef typename mpl::next<iter1>::type iter2;
  162.         typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
  163.         typedef typename mpl::next<iter2>::type iter3;
  164.         typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
  165.         typedef typename mpl::next<iter3>::type iter4;
  166.        
  167.  
  168.         typedef state4 state;
  169.         typedef iter4 iterator;
  170.     };
  171.  
  172.     /// ETI workaround
  173.     template<> struct result_< int,int,int,int >
  174.     {
  175.         typedef int state;
  176.         typedef int iterator;
  177.     };
  178.  
  179. };
  180.  
  181. template< int N >
  182. struct iter_fold_chunk
  183. {
  184.     template<
  185.           typename First
  186.         , typename Last
  187.         , typename State
  188.         , typename ForwardOp
  189.         >
  190.     struct result_
  191.     {
  192.         typedef iter_fold_impl<
  193.               4
  194.             , First
  195.             , Last
  196.             , State
  197.             , ForwardOp
  198.             > chunk_;
  199.  
  200.         typedef iter_fold_impl<
  201.               ( (N - 4) < 0 ? 0 : N - 4 )
  202.             , typename chunk_::iterator
  203.             , Last
  204.             , typename chunk_::state
  205.             , ForwardOp
  206.             > res_;
  207.  
  208.         typedef typename res_::state state;
  209.         typedef typename res_::iterator iterator;
  210.     };
  211. };
  212.  
  213. template<
  214.       typename First
  215.     , typename Last
  216.     , typename State
  217.     , typename ForwardOp
  218.     >
  219. struct iter_fold_step;
  220.  
  221. template<
  222.       typename Last
  223.     , typename State
  224.     >
  225. struct iter_fold_null_step
  226. {
  227.     typedef Last iterator;
  228.     typedef State state;
  229. };
  230.  
  231. template<>
  232. struct iter_fold_chunk< -1 >
  233. {
  234.     template<
  235.           typename First
  236.         , typename Last
  237.         , typename State
  238.         , typename ForwardOp
  239.         >
  240.     struct result_
  241.     {
  242.         typedef typename if_<
  243.               typename is_same< First,Last >::type
  244.             , iter_fold_null_step< Last,State >
  245.             , iter_fold_step< First,Last,State,ForwardOp >
  246.             >::type res_;
  247.  
  248.         typedef typename res_::state state;
  249.         typedef typename res_::iterator iterator;
  250.     };
  251.  
  252.     /// ETI workaround
  253.     template<> struct result_< int,int,int,int >
  254.     {
  255.         typedef int state;
  256.         typedef int iterator;
  257.     };
  258.  
  259. };
  260.  
  261. template<
  262.       typename First
  263.     , typename Last
  264.     , typename State
  265.     , typename ForwardOp
  266.     >
  267. struct iter_fold_step
  268. {
  269.     typedef iter_fold_chunk< -1 >::template result_<
  270.           typename mpl::next<First>::type
  271.         , Last
  272.         , typename apply2< ForwardOp,State,First >::type
  273.         , ForwardOp
  274.         > chunk_;
  275.  
  276.     typedef typename chunk_::state state;
  277.     typedef typename chunk_::iterator iterator;
  278. };
  279.  
  280. template<
  281.       int N
  282.     , typename First
  283.     , typename Last
  284.     , typename State
  285.     , typename ForwardOp
  286.     >
  287. struct iter_fold_impl
  288.     : iter_fold_chunk<N>
  289.         ::template result_< First,Last,State,ForwardOp >
  290. {
  291. };
  292.  
  293. }}}
  294.  
downloaditer_fold_impl.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top