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

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/preprocessed/no_ctps/vector_c.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/vector_c.hpp' header
 
2
// see the original for copyright information
 
3
 
 
4
namespace boost {
 
5
namespace mpl {
 
6
 
 
7
namespace aux {
 
8
template< int N > struct vector_c_impl_chooser;
 
9
}
 
10
 
 
11
namespace aux {
 
12
 
 
13
template<>
 
14
struct vector_c_impl_chooser<0>
 
15
{
 
16
    template<
 
17
          typename T
 
18
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
19
        , long C7, long C8, long C9
 
20
        >
 
21
    struct result_
 
22
    {
 
23
        typedef vector0_c<
 
24
              T  
 
25
            > type;
 
26
    };
 
27
};
 
28
 
 
29
} // namespace aux
 
30
 
 
31
namespace aux {
 
32
 
 
33
template<>
 
34
struct vector_c_impl_chooser<1>
 
35
{
 
36
    template<
 
37
          typename T
 
38
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
39
        , long C7, long C8, long C9
 
40
        >
 
41
    struct result_
 
42
    {
 
43
        typedef vector1_c<
 
44
              T, C0
 
45
            > type;
 
46
    };
 
47
};
 
48
 
 
49
} // namespace aux
 
50
 
 
51
namespace aux {
 
52
 
 
53
template<>
 
54
struct vector_c_impl_chooser<2>
 
55
{
 
56
    template<
 
57
          typename T
 
58
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
59
        , long C7, long C8, long C9
 
60
        >
 
61
    struct result_
 
62
    {
 
63
        typedef vector2_c<
 
64
              T, C0, C1
 
65
            > type;
 
66
    };
 
67
};
 
68
 
 
69
} // namespace aux
 
70
 
 
71
namespace aux {
 
72
 
 
73
template<>
 
74
struct vector_c_impl_chooser<3>
 
75
{
 
76
    template<
 
77
          typename T
 
78
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
79
        , long C7, long C8, long C9
 
80
        >
 
81
    struct result_
 
82
    {
 
83
        typedef vector3_c<
 
84
              T, C0, C1, C2
 
85
            > type;
 
86
    };
 
87
};
 
88
 
 
89
} // namespace aux
 
90
 
 
91
namespace aux {
 
92
 
 
93
template<>
 
94
struct vector_c_impl_chooser<4>
 
95
{
 
96
    template<
 
97
          typename T
 
98
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
99
        , long C7, long C8, long C9
 
100
        >
 
101
    struct result_
 
102
    {
 
103
        typedef vector4_c<
 
104
              T, C0, C1, C2, C3
 
105
            > type;
 
106
    };
 
107
};
 
108
 
 
109
} // namespace aux
 
110
 
 
111
namespace aux {
 
112
 
 
113
template<>
 
114
struct vector_c_impl_chooser<5>
 
115
{
 
116
    template<
 
117
          typename T
 
118
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
119
        , long C7, long C8, long C9
 
120
        >
 
121
    struct result_
 
122
    {
 
123
        typedef vector5_c<
 
124
              T, C0, C1, C2, C3, C4
 
125
            > type;
 
126
    };
 
127
};
 
128
 
 
129
} // namespace aux
 
130
 
 
131
namespace aux {
 
132
 
 
133
template<>
 
134
struct vector_c_impl_chooser<6>
 
135
{
 
136
    template<
 
137
          typename T
 
138
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
139
        , long C7, long C8, long C9
 
140
        >
 
141
    struct result_
 
142
    {
 
143
        typedef vector6_c<
 
144
              T, C0, C1, C2, C3, C4, C5
 
145
            > type;
 
146
    };
 
147
};
 
148
 
 
149
} // namespace aux
 
150
 
 
151
namespace aux {
 
152
 
 
153
template<>
 
154
struct vector_c_impl_chooser<7>
 
155
{
 
156
    template<
 
157
          typename T
 
158
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
159
        , long C7, long C8, long C9
 
160
        >
 
161
    struct result_
 
162
    {
 
163
        typedef vector7_c<
 
164
              T, C0, C1, C2, C3, C4, C5, C6
 
165
            > type;
 
166
    };
 
167
};
 
168
 
 
169
} // namespace aux
 
170
 
 
171
namespace aux {
 
172
 
 
173
template<>
 
174
struct vector_c_impl_chooser<8>
 
175
{
 
176
    template<
 
177
          typename T
 
178
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
179
        , long C7, long C8, long C9
 
180
        >
 
181
    struct result_
 
182
    {
 
183
        typedef vector8_c<
 
184
              T, C0, C1, C2, C3, C4, C5, C6, C7
 
185
            > type;
 
186
    };
 
187
};
 
188
 
 
189
} // namespace aux
 
190
 
 
191
namespace aux {
 
192
 
 
193
template<>
 
194
struct vector_c_impl_chooser<9>
 
195
{
 
196
    template<
 
197
          typename T
 
198
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
199
        , long C7, long C8, long C9
 
200
        >
 
201
    struct result_
 
202
    {
 
203
        typedef vector9_c<
 
204
              T, C0, C1, C2, C3, C4, C5, C6, C7, C8
 
205
            > type;
 
206
    };
 
207
};
 
208
 
 
209
} // namespace aux
 
210
 
 
211
namespace aux {
 
212
 
 
213
template<>
 
214
struct vector_c_impl_chooser<10>
 
215
{
 
216
    template<
 
217
          typename T
 
218
        , long C0, long C1, long C2, long C3, long C4, long C5, long C6
 
219
        , long C7, long C8, long C9
 
220
        >
 
221
    struct result_
 
222
    {
 
223
        typedef vector10_c<
 
224
              T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
 
225
            > type;
 
226
    };
 
227
};
 
228
 
 
229
} // namespace aux
 
230
 
 
231
namespace aux {
 
232
 
 
233
template< long T >
 
234
struct is_vector_c_arg
 
235
{
 
236
    static bool const value = true;
 
237
};
 
238
 
 
239
template<>
 
240
struct is_vector_c_arg<LONG_MAX>
 
241
{
 
242
    static bool const value = false;
 
243
};
 
244
 
 
245
template<
 
246
      long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8
 
247
    , long T9, long T10
 
248
    >
 
249
struct vector_c_count_args
 
250
{
 
251
    static int const value =
 
252
          is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value 
 
253
        + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value 
 
254
        + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value 
 
255
        + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value 
 
256
        + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value
 
257
        ;
 
258
};
 
259
 
 
260
template<
 
261
      typename T
 
262
    , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7
 
263
    , long C8, long C9
 
264
    >
 
265
struct vector_c_impl
 
266
{
 
267
    typedef aux::vector_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_;
 
268
    typedef typename aux::vector_c_impl_chooser< arg_num_::value >
 
269
        ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type;
 
270
};
 
271
 
 
272
} // namespace aux
 
273
 
 
274
template<
 
275
      typename T
 
276
    , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
 
277
    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
 
278
    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
 
279
    , long C9 = LONG_MAX
 
280
    >
 
281
struct vector_c
 
282
    : aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type
 
283
{
 
284
    typedef typename aux::vector_c_impl<
 
285
          T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9
 
286
        >::type type;
 
287
};
 
288
 
 
289
} // namespace mpl
 
290
} // namespace boost
 
291