~ubuntu-branches/ubuntu/breezy/aqsis/breezy

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Will Newton
  • Date: 2004-12-07 20:06:49 UTC
  • Revision ID: james.westby@ubuntu.com-20041207200649-fccswkrvp4oc8lmn
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header
 
2
// see the original for copyright information
 
3
 
 
4
namespace boost {
 
5
namespace mpl {
 
6
namespace aux {
 
7
 
 
8
template< long N > struct advance_backward;
 
9
 
 
10
template<>
 
11
struct advance_backward<0>
 
12
{
 
13
    template< typename Iterator > struct apply
 
14
    {
 
15
        typedef Iterator iter0;
 
16
        typedef iter0 type;
 
17
    };
 
18
 
 
19
};
 
20
 
 
21
template<>
 
22
struct advance_backward<1>
 
23
{
 
24
    template< typename Iterator > struct apply
 
25
    {
 
26
        typedef Iterator iter0;
 
27
        typedef typename iter0::prior iter1;
 
28
        typedef iter1 type;
 
29
    };
 
30
 
 
31
};
 
32
 
 
33
template<>
 
34
struct advance_backward<2>
 
35
{
 
36
    template< typename Iterator > struct apply
 
37
    {
 
38
        typedef Iterator iter0;
 
39
        typedef typename iter0::prior iter1;
 
40
        typedef typename iter1::prior iter2;
 
41
        typedef iter2 type;
 
42
    };
 
43
 
 
44
};
 
45
 
 
46
template<>
 
47
struct advance_backward<3>
 
48
{
 
49
    template< typename Iterator > struct apply
 
50
    {
 
51
        typedef Iterator iter0;
 
52
        typedef typename iter0::prior iter1;
 
53
        typedef typename iter1::prior iter2;
 
54
        typedef typename iter2::prior iter3;
 
55
        typedef iter3 type;
 
56
    };
 
57
 
 
58
};
 
59
 
 
60
template<>
 
61
struct advance_backward<4>
 
62
{
 
63
    template< typename Iterator > struct apply
 
64
    {
 
65
        typedef Iterator iter0;
 
66
        typedef typename iter0::prior iter1;
 
67
        typedef typename iter1::prior iter2;
 
68
        typedef typename iter2::prior iter3;
 
69
        typedef typename iter3::prior iter4;
 
70
        typedef iter4 type;
 
71
    };
 
72
 
 
73
};
 
74
 
 
75
template< long N >
 
76
struct advance_backward
 
77
{
 
78
    template< typename Iterator > struct apply
 
79
    {
 
80
        typedef typename advance_backward<4>::template apply<Iterator>::type chunk_result_;
 
81
        typedef typename advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type;
 
82
    };
 
83
};
 
84
 
 
85
} // namespace aux
 
86
} // namespace mpl
 
87
} // namespace boost
 
88