advance_backward.hpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl { namespace aux {
  10. template< long N > struct advance_backward;
  11. template<>
  12. struct advance_backward<0>
  13. {
  14. template< typename Iterator > struct apply
  15. {
  16. typedef Iterator iter0;
  17. typedef iter0 type;
  18. };
  19. /// ETI workaround
  20. template<> struct apply<int>
  21. {
  22. typedef int type;
  23. };
  24. };
  25. template<>
  26. struct advance_backward<1>
  27. {
  28. template< typename Iterator > struct apply
  29. {
  30. typedef Iterator iter0;
  31. typedef typename prior<iter0>::type iter1;
  32. typedef iter1 type;
  33. };
  34. /// ETI workaround
  35. template<> struct apply<int>
  36. {
  37. typedef int type;
  38. };
  39. };
  40. template<>
  41. struct advance_backward<2>
  42. {
  43. template< typename Iterator > struct apply
  44. {
  45. typedef Iterator iter0;
  46. typedef typename prior<iter0>::type iter1;
  47. typedef typename prior<iter1>::type iter2;
  48. typedef iter2 type;
  49. };
  50. /// ETI workaround
  51. template<> struct apply<int>
  52. {
  53. typedef int type;
  54. };
  55. };
  56. template<>
  57. struct advance_backward<3>
  58. {
  59. template< typename Iterator > struct apply
  60. {
  61. typedef Iterator iter0;
  62. typedef typename prior<iter0>::type iter1;
  63. typedef typename prior<iter1>::type iter2;
  64. typedef typename prior<iter2>::type iter3;
  65. typedef iter3 type;
  66. };
  67. /// ETI workaround
  68. template<> struct apply<int>
  69. {
  70. typedef int type;
  71. };
  72. };
  73. template<>
  74. struct advance_backward<4>
  75. {
  76. template< typename Iterator > struct apply
  77. {
  78. typedef Iterator iter0;
  79. typedef typename prior<iter0>::type iter1;
  80. typedef typename prior<iter1>::type iter2;
  81. typedef typename prior<iter2>::type iter3;
  82. typedef typename prior<iter3>::type iter4;
  83. typedef iter4 type;
  84. };
  85. /// ETI workaround
  86. template<> struct apply<int>
  87. {
  88. typedef int type;
  89. };
  90. };
  91. template< long N >
  92. struct advance_backward
  93. {
  94. template< typename Iterator > struct apply
  95. {
  96. typedef typename apply_wrap1<
  97. advance_backward<4>
  98. , Iterator
  99. >::type chunk_result_;
  100. typedef typename apply_wrap1<
  101. advance_backward<(
  102. (N - 4) < 0
  103. ? 0
  104. : N - 4
  105. )>
  106. , chunk_result_
  107. >::type type;
  108. };
  109. };
  110. }}}