~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header
 
2
// see the original for copyright information
 
3
 
 
4
namespace boost {
 
5
namespace mpl {
 
6
namespace aux {
 
7
 
 
8
template< nttp_long N > struct advance_forward;
 
9
 
 
10
template<>
 
11
struct advance_forward<0>
 
12
{
 
13
    template< typename Iterator > struct apply
 
14
    {
 
15
        typedef Iterator iter0;
 
16
        typedef iter0 type;
 
17
    };
 
18
 
 
19
    // ETI workaround
 
20
    template<> struct apply<int>
 
21
    {
 
22
        typedef int type;
 
23
    };
 
24
 
 
25
};
 
26
 
 
27
template<>
 
28
struct advance_forward<1>
 
29
{
 
30
    template< typename Iterator > struct apply
 
31
    {
 
32
        typedef Iterator iter0;
 
33
        typedef typename iter0::next iter1;
 
34
        typedef iter1 type;
 
35
    };
 
36
 
 
37
    // ETI workaround
 
38
    template<> struct apply<int>
 
39
    {
 
40
        typedef int type;
 
41
    };
 
42
 
 
43
};
 
44
 
 
45
template<>
 
46
struct advance_forward<2>
 
47
{
 
48
    template< typename Iterator > struct apply
 
49
    {
 
50
        typedef Iterator iter0;
 
51
        typedef typename iter0::next iter1;
 
52
        typedef typename iter1::next iter2;
 
53
        typedef iter2 type;
 
54
    };
 
55
 
 
56
    // ETI workaround
 
57
    template<> struct apply<int>
 
58
    {
 
59
        typedef int type;
 
60
    };
 
61
 
 
62
};
 
63
 
 
64
template<>
 
65
struct advance_forward<3>
 
66
{
 
67
    template< typename Iterator > struct apply
 
68
    {
 
69
        typedef Iterator iter0;
 
70
        typedef typename iter0::next iter1;
 
71
        typedef typename iter1::next iter2;
 
72
        typedef typename iter2::next iter3;
 
73
        typedef iter3 type;
 
74
    };
 
75
 
 
76
    // ETI workaround
 
77
    template<> struct apply<int>
 
78
    {
 
79
        typedef int type;
 
80
    };
 
81
 
 
82
};
 
83
 
 
84
template<>
 
85
struct advance_forward<4>
 
86
{
 
87
    template< typename Iterator > struct apply
 
88
    {
 
89
        typedef Iterator iter0;
 
90
        typedef typename iter0::next iter1;
 
91
        typedef typename iter1::next iter2;
 
92
        typedef typename iter2::next iter3;
 
93
        typedef typename iter3::next iter4;
 
94
        typedef iter4 type;
 
95
    };
 
96
 
 
97
    // ETI workaround
 
98
    template<> struct apply<int>
 
99
    {
 
100
        typedef int type;
 
101
    };
 
102
 
 
103
};
 
104
 
 
105
template< nttp_long N > 
 
106
struct advance_forward
 
107
{
 
108
    template< typename Iterator > struct apply
 
109
    {
 
110
        typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_;
 
111
        typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type;
 
112
    };
 
113
};
 
114
 
 
115
} // namespace aux
 
116
} // namespace mpl
 
117
} // namespace boost
 
118