Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 "ndnboost/mpl/aux_/advance_backward.hpp" header |
| 10 | // -- DO NOT modify by hand! |
| 11 | |
| 12 | namespace ndnboost { namespace mpl { namespace aux { |
| 13 | |
| 14 | template< long N > struct advance_backward; |
| 15 | template<> |
| 16 | struct advance_backward<0> |
| 17 | { |
| 18 | template< typename Iterator > struct apply |
| 19 | { |
| 20 | typedef Iterator iter0; |
| 21 | typedef iter0 type; |
| 22 | }; |
| 23 | |
| 24 | /// ETI workaround |
| 25 | template<> struct apply<int> |
| 26 | { |
| 27 | typedef int type; |
| 28 | }; |
| 29 | |
| 30 | }; |
| 31 | |
| 32 | template<> |
| 33 | struct advance_backward<1> |
| 34 | { |
| 35 | template< typename Iterator > struct apply |
| 36 | { |
| 37 | typedef Iterator iter0; |
| 38 | typedef typename prior<iter0>::type iter1; |
| 39 | typedef iter1 type; |
| 40 | }; |
| 41 | |
| 42 | /// ETI workaround |
| 43 | template<> struct apply<int> |
| 44 | { |
| 45 | typedef int type; |
| 46 | }; |
| 47 | |
| 48 | }; |
| 49 | |
| 50 | template<> |
| 51 | struct advance_backward<2> |
| 52 | { |
| 53 | template< typename Iterator > struct apply |
| 54 | { |
| 55 | typedef Iterator iter0; |
| 56 | typedef typename prior<iter0>::type iter1; |
| 57 | typedef typename prior<iter1>::type iter2; |
| 58 | typedef iter2 type; |
| 59 | }; |
| 60 | |
| 61 | /// ETI workaround |
| 62 | template<> struct apply<int> |
| 63 | { |
| 64 | typedef int type; |
| 65 | }; |
| 66 | |
| 67 | }; |
| 68 | |
| 69 | template<> |
| 70 | struct advance_backward<3> |
| 71 | { |
| 72 | template< typename Iterator > struct apply |
| 73 | { |
| 74 | typedef Iterator iter0; |
| 75 | typedef typename prior<iter0>::type iter1; |
| 76 | typedef typename prior<iter1>::type iter2; |
| 77 | typedef typename prior<iter2>::type iter3; |
| 78 | typedef iter3 type; |
| 79 | }; |
| 80 | |
| 81 | /// ETI workaround |
| 82 | template<> struct apply<int> |
| 83 | { |
| 84 | typedef int type; |
| 85 | }; |
| 86 | |
| 87 | }; |
| 88 | |
| 89 | template<> |
| 90 | struct advance_backward<4> |
| 91 | { |
| 92 | template< typename Iterator > struct apply |
| 93 | { |
| 94 | typedef Iterator iter0; |
| 95 | typedef typename prior<iter0>::type iter1; |
| 96 | typedef typename prior<iter1>::type iter2; |
| 97 | typedef typename prior<iter2>::type iter3; |
| 98 | typedef typename prior<iter3>::type iter4; |
| 99 | typedef iter4 type; |
| 100 | }; |
| 101 | |
| 102 | /// ETI workaround |
| 103 | template<> struct apply<int> |
| 104 | { |
| 105 | typedef int type; |
| 106 | }; |
| 107 | |
| 108 | }; |
| 109 | |
| 110 | template< long N > |
| 111 | struct advance_backward |
| 112 | { |
| 113 | template< typename Iterator > struct apply |
| 114 | { |
| 115 | typedef typename apply_wrap1< |
| 116 | advance_backward<4> |
| 117 | , Iterator |
| 118 | >::type chunk_result_; |
| 119 | |
| 120 | typedef typename apply_wrap1< |
| 121 | advance_backward<( |
| 122 | (N - 4) < 0 |
| 123 | ? 0 |
| 124 | : N - 4 |
| 125 | )> |
| 126 | , chunk_result_ |
| 127 | >::type type; |
| 128 | }; |
| 129 | }; |
| 130 | |
| 131 | }}} |
| 132 | |