blob: 0e0c8285d3d4645168f41c97a0d55c7858255e6a [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
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
12namespace ndnboost { namespace mpl { namespace aux {
13
14template< long N > struct advance_backward;
15template<>
16struct advance_backward<0>
17{
18 template< typename Iterator > struct apply
19 {
20 typedef Iterator iter0;
21 typedef iter0 type;
22 };
23};
24
25template<>
26struct 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};
35
36template<>
37struct advance_backward<2>
38{
39 template< typename Iterator > struct apply
40 {
41 typedef Iterator iter0;
42 typedef typename prior<iter0>::type iter1;
43 typedef typename prior<iter1>::type iter2;
44 typedef iter2 type;
45 };
46};
47
48template<>
49struct advance_backward<3>
50{
51 template< typename Iterator > struct apply
52 {
53 typedef Iterator iter0;
54 typedef typename prior<iter0>::type iter1;
55 typedef typename prior<iter1>::type iter2;
56 typedef typename prior<iter2>::type iter3;
57 typedef iter3 type;
58 };
59};
60
61template<>
62struct advance_backward<4>
63{
64 template< typename Iterator > struct apply
65 {
66 typedef Iterator iter0;
67 typedef typename prior<iter0>::type iter1;
68 typedef typename prior<iter1>::type iter2;
69 typedef typename prior<iter2>::type iter3;
70 typedef typename prior<iter3>::type iter4;
71 typedef iter4 type;
72 };
73};
74
75template< long N >
76struct advance_backward
77{
78 template< typename Iterator > struct apply
79 {
80 typedef typename apply_wrap1<
81 advance_backward<4>
82 , Iterator
83 >::type chunk_result_;
84
85 typedef typename apply_wrap1<
86 advance_backward<(
87 (N - 4) < 0
88 ? 0
89 : N - 4
90 )>
91 , chunk_result_
92 >::type type;
93 };
94};
95
96}}}
97