sl@0
|
1 |
/*=============================================================================
|
sl@0
|
2 |
Phoenix V1.2.1
|
sl@0
|
3 |
Copyright (c) 2001-2002 Joel de Guzman
|
sl@0
|
4 |
|
sl@0
|
5 |
Use, modification and distribution is subject to the Boost Software
|
sl@0
|
6 |
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
7 |
http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
8 |
==============================================================================*/
|
sl@0
|
9 |
#ifndef PHOENIX_TUPLES_HPP
|
sl@0
|
10 |
#define PHOENIX_TUPLES_HPP
|
sl@0
|
11 |
|
sl@0
|
12 |
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
sl@0
|
13 |
#error "Sorry, Phoenix does not support VC6 and VC7. Please upgrade to at least VC7.1"
|
sl@0
|
14 |
#endif
|
sl@0
|
15 |
|
sl@0
|
16 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
17 |
//
|
sl@0
|
18 |
// Phoenix predefined maximum limit. This limit defines the maximum
|
sl@0
|
19 |
// number of elements a tuple can hold. This number defaults to 3. The
|
sl@0
|
20 |
// actual maximum is rounded up in multiples of 3. Thus, if this value
|
sl@0
|
21 |
// is 4, the actual limit is 6. The ultimate maximum limit in this
|
sl@0
|
22 |
// implementation is 15.
|
sl@0
|
23 |
//
|
sl@0
|
24 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
25 |
#ifndef PHOENIX_LIMIT
|
sl@0
|
26 |
#define PHOENIX_LIMIT 3
|
sl@0
|
27 |
#endif
|
sl@0
|
28 |
|
sl@0
|
29 |
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561)
|
sl@0
|
30 |
namespace phoenix { namespace borland_only
|
sl@0
|
31 |
{
|
sl@0
|
32 |
namespace ftors
|
sl@0
|
33 |
{
|
sl@0
|
34 |
// We define these dummy template functions. Borland complains when
|
sl@0
|
35 |
// a template class has the same name as a template function,
|
sl@0
|
36 |
// regardless if they are in different namespaces.
|
sl@0
|
37 |
|
sl@0
|
38 |
template <typename T> void if_(T) {}
|
sl@0
|
39 |
template <typename T> void for_(T) {}
|
sl@0
|
40 |
template <typename T> void while_(T) {}
|
sl@0
|
41 |
template <typename T> void do_(T) {}
|
sl@0
|
42 |
}
|
sl@0
|
43 |
|
sl@0
|
44 |
namespace tmpls
|
sl@0
|
45 |
{
|
sl@0
|
46 |
// We define these dummy template functions. Borland complains when
|
sl@0
|
47 |
// a template class has the same name as a template function,
|
sl@0
|
48 |
// regardless if they are in different namespaces.
|
sl@0
|
49 |
|
sl@0
|
50 |
template <typename T> struct if_ {};
|
sl@0
|
51 |
template <typename T> struct for_ {};
|
sl@0
|
52 |
template <typename T> struct while_ {};
|
sl@0
|
53 |
template <typename T> struct do_ {};
|
sl@0
|
54 |
}
|
sl@0
|
55 |
|
sl@0
|
56 |
}} // namespace phoenix::borland_only
|
sl@0
|
57 |
#endif
|
sl@0
|
58 |
|
sl@0
|
59 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
60 |
#include <boost/static_assert.hpp>
|
sl@0
|
61 |
#include <boost/call_traits.hpp>
|
sl@0
|
62 |
#include <boost/type_traits/remove_reference.hpp>
|
sl@0
|
63 |
|
sl@0
|
64 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
65 |
namespace phoenix {
|
sl@0
|
66 |
|
sl@0
|
67 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
68 |
//
|
sl@0
|
69 |
// tuple
|
sl@0
|
70 |
//
|
sl@0
|
71 |
// Tuples hold heterogeneous types up to a predefined maximum. Only
|
sl@0
|
72 |
// the most basic functionality needed is provided. Unlike other
|
sl@0
|
73 |
// recursive list-like tuple implementations, this tuple
|
sl@0
|
74 |
// implementation uses simple structs similar to std::pair with
|
sl@0
|
75 |
// specialization for 0 to N tuple elements.
|
sl@0
|
76 |
//
|
sl@0
|
77 |
// 1) Construction
|
sl@0
|
78 |
// Here are examples on how to construct tuples:
|
sl@0
|
79 |
//
|
sl@0
|
80 |
// typedef tuple<int, char> t1_t;
|
sl@0
|
81 |
// typedef tuple<int, std::string, double> t2_t;
|
sl@0
|
82 |
//
|
sl@0
|
83 |
// // this tuple has an int and char members
|
sl@0
|
84 |
// t1_t t1(3, 'c');
|
sl@0
|
85 |
//
|
sl@0
|
86 |
// // this tuple has an int, std::string and double members
|
sl@0
|
87 |
// t2_t t2(3, "hello", 3.14);
|
sl@0
|
88 |
//
|
sl@0
|
89 |
// Tuples can also be constructed from other tuples. The
|
sl@0
|
90 |
// source and destination tuples need not have exactly the
|
sl@0
|
91 |
// same element types. The only requirement is that the
|
sl@0
|
92 |
// source tuple have the same number of elements as the
|
sl@0
|
93 |
// destination and that each element slot in the
|
sl@0
|
94 |
// destination can be copy constructed from the source
|
sl@0
|
95 |
// element. For example:
|
sl@0
|
96 |
//
|
sl@0
|
97 |
// tuple<double, double> t3(t1); // OK. Compatible tuples
|
sl@0
|
98 |
// tuple<double, double> t4(t2); // Error! Incompatible tuples
|
sl@0
|
99 |
//
|
sl@0
|
100 |
// 2) Member access
|
sl@0
|
101 |
// A member in a tuple can be accessed using the
|
sl@0
|
102 |
// tuple's [] operator by specifying the Nth
|
sl@0
|
103 |
// tuple_index. Here are some examples:
|
sl@0
|
104 |
//
|
sl@0
|
105 |
// tuple_index<0> ix0; // 0th index == 1st item
|
sl@0
|
106 |
// tuple_index<1> ix1; // 1st index == 2nd item
|
sl@0
|
107 |
// tuple_index<2> ix2; // 2nd index == 3rd item
|
sl@0
|
108 |
//
|
sl@0
|
109 |
// t1[ix0] = 33; // sets the int member of the tuple t1
|
sl@0
|
110 |
// t2[ix2] = 6e6; // sets the double member of the tuple t2
|
sl@0
|
111 |
// t1[ix1] = 'a'; // sets the char member of the tuple t1
|
sl@0
|
112 |
//
|
sl@0
|
113 |
// There are some predefined names are provided in sub-
|
sl@0
|
114 |
// namespace tuple_index_names:
|
sl@0
|
115 |
//
|
sl@0
|
116 |
// tuple_index<0> _1;
|
sl@0
|
117 |
// tuple_index<1> _2;
|
sl@0
|
118 |
// ...
|
sl@0
|
119 |
// tuple_index<N> _N;
|
sl@0
|
120 |
//
|
sl@0
|
121 |
// These indexes may be used by 'using' namespace
|
sl@0
|
122 |
// phoenix::tuple_index_names.
|
sl@0
|
123 |
//
|
sl@0
|
124 |
// Access to out of bound indexes returns a nil_t value.
|
sl@0
|
125 |
//
|
sl@0
|
126 |
// 3) Member type inquiry
|
sl@0
|
127 |
// The type of an individual member can be queried.
|
sl@0
|
128 |
// Example:
|
sl@0
|
129 |
//
|
sl@0
|
130 |
// tuple_element<1, t2_t>::type
|
sl@0
|
131 |
//
|
sl@0
|
132 |
// Refers to the type of the second member (note zero based,
|
sl@0
|
133 |
// thus 0 = 1st item, 1 = 2nd item) of the tuple.
|
sl@0
|
134 |
//
|
sl@0
|
135 |
// Aside from tuple_element<N, T>::type, there are two
|
sl@0
|
136 |
// more types that tuple_element provides: rtype and
|
sl@0
|
137 |
// crtype. While 'type' is the plain underlying type,
|
sl@0
|
138 |
// 'rtype' is the reference type, or type& and 'crtype'
|
sl@0
|
139 |
// is the constant reference type or type const&. The
|
sl@0
|
140 |
// latter two are provided to make it easy for the
|
sl@0
|
141 |
// client in dealing with the possibility of reference
|
sl@0
|
142 |
// to reference when type is already a reference, which
|
sl@0
|
143 |
// is illegal in C++.
|
sl@0
|
144 |
//
|
sl@0
|
145 |
// Access to out of bound indexes returns a nil_t type.
|
sl@0
|
146 |
//
|
sl@0
|
147 |
// 4) Tuple length
|
sl@0
|
148 |
// The number of elements in a tuple can be queried.
|
sl@0
|
149 |
// Example:
|
sl@0
|
150 |
//
|
sl@0
|
151 |
// int n = t1.length;
|
sl@0
|
152 |
//
|
sl@0
|
153 |
// gets the number of elements in tuple t1.
|
sl@0
|
154 |
//
|
sl@0
|
155 |
// length is a static constant. Thus, TupleT::length
|
sl@0
|
156 |
// also works. Example:
|
sl@0
|
157 |
//
|
sl@0
|
158 |
// int n = t1_t::length;
|
sl@0
|
159 |
//
|
sl@0
|
160 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
161 |
struct nil_t {};
|
sl@0
|
162 |
using boost::remove_reference;
|
sl@0
|
163 |
using boost::call_traits;
|
sl@0
|
164 |
|
sl@0
|
165 |
//////////////////////////////////
|
sl@0
|
166 |
namespace impl {
|
sl@0
|
167 |
|
sl@0
|
168 |
template <typename T>
|
sl@0
|
169 |
struct access {
|
sl@0
|
170 |
|
sl@0
|
171 |
typedef const T& ctype;
|
sl@0
|
172 |
typedef T& type;
|
sl@0
|
173 |
};
|
sl@0
|
174 |
|
sl@0
|
175 |
template <typename T>
|
sl@0
|
176 |
struct access<T&> {
|
sl@0
|
177 |
|
sl@0
|
178 |
typedef T& ctype;
|
sl@0
|
179 |
typedef T& type;
|
sl@0
|
180 |
};
|
sl@0
|
181 |
}
|
sl@0
|
182 |
|
sl@0
|
183 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
184 |
//
|
sl@0
|
185 |
// tuple_element
|
sl@0
|
186 |
//
|
sl@0
|
187 |
// A query class that gets the Nth element inside a tuple.
|
sl@0
|
188 |
// Examples:
|
sl@0
|
189 |
//
|
sl@0
|
190 |
// tuple_element<1, tuple<int, char, void*> >::type // plain
|
sl@0
|
191 |
// tuple_element<1, tuple<int, char, void*> >::rtype // ref
|
sl@0
|
192 |
// tuple_element<1, tuple<int, char, void*> >::crtype // const ref
|
sl@0
|
193 |
//
|
sl@0
|
194 |
// Has type char which is the 2nd type in the tuple
|
sl@0
|
195 |
// (note zero based, thus 0 = 1st item, 1 = 2nd item).
|
sl@0
|
196 |
//
|
sl@0
|
197 |
// Given a tuple object, the static function tuple_element<N,
|
sl@0
|
198 |
// TupleT>::get(tuple) gets the Nth element in the tuple. The
|
sl@0
|
199 |
// tuple class' tuple::operator[] uses this to get its Nth
|
sl@0
|
200 |
// element.
|
sl@0
|
201 |
//
|
sl@0
|
202 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
203 |
template <int N, typename TupleT>
|
sl@0
|
204 |
struct tuple_element
|
sl@0
|
205 |
{
|
sl@0
|
206 |
typedef nil_t type;
|
sl@0
|
207 |
typedef nil_t& rtype;
|
sl@0
|
208 |
typedef nil_t const& crtype;
|
sl@0
|
209 |
|
sl@0
|
210 |
static nil_t get(TupleT const& t) { return nil_t(); }
|
sl@0
|
211 |
};
|
sl@0
|
212 |
|
sl@0
|
213 |
//////////////////////////////////
|
sl@0
|
214 |
template <typename TupleT>
|
sl@0
|
215 |
struct tuple_element<0, TupleT>
|
sl@0
|
216 |
{
|
sl@0
|
217 |
typedef typename TupleT::a_type type;
|
sl@0
|
218 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
219 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
220 |
|
sl@0
|
221 |
static rtype get(TupleT& t) { return t.a; }
|
sl@0
|
222 |
static crtype get(TupleT const& t) { return t.a; }
|
sl@0
|
223 |
};
|
sl@0
|
224 |
|
sl@0
|
225 |
//////////////////////////////////
|
sl@0
|
226 |
template <typename TupleT>
|
sl@0
|
227 |
struct tuple_element<1, TupleT>
|
sl@0
|
228 |
{
|
sl@0
|
229 |
typedef typename TupleT::b_type type;
|
sl@0
|
230 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
231 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
232 |
|
sl@0
|
233 |
static rtype get(TupleT& t) { return t.b; }
|
sl@0
|
234 |
static crtype get(TupleT const& t) { return t.b; }
|
sl@0
|
235 |
};
|
sl@0
|
236 |
|
sl@0
|
237 |
//////////////////////////////////
|
sl@0
|
238 |
template <typename TupleT>
|
sl@0
|
239 |
struct tuple_element<2, TupleT>
|
sl@0
|
240 |
{
|
sl@0
|
241 |
typedef typename TupleT::c_type type;
|
sl@0
|
242 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
243 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
244 |
|
sl@0
|
245 |
static rtype get(TupleT& t) { return t.c; }
|
sl@0
|
246 |
static crtype get(TupleT const& t) { return t.c; }
|
sl@0
|
247 |
};
|
sl@0
|
248 |
|
sl@0
|
249 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
250 |
//////////////////////////////////
|
sl@0
|
251 |
template <typename TupleT>
|
sl@0
|
252 |
struct tuple_element<3, TupleT>
|
sl@0
|
253 |
{
|
sl@0
|
254 |
typedef typename TupleT::d_type type;
|
sl@0
|
255 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
256 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
257 |
|
sl@0
|
258 |
static rtype get(TupleT& t) { return t.d; }
|
sl@0
|
259 |
static crtype get(TupleT const& t) { return t.d; }
|
sl@0
|
260 |
};
|
sl@0
|
261 |
|
sl@0
|
262 |
//////////////////////////////////
|
sl@0
|
263 |
template <typename TupleT>
|
sl@0
|
264 |
struct tuple_element<4, TupleT>
|
sl@0
|
265 |
{
|
sl@0
|
266 |
typedef typename TupleT::e_type type;
|
sl@0
|
267 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
268 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
269 |
|
sl@0
|
270 |
static rtype get(TupleT& t) { return t.e; }
|
sl@0
|
271 |
static crtype get(TupleT const& t) { return t.e; }
|
sl@0
|
272 |
};
|
sl@0
|
273 |
|
sl@0
|
274 |
//////////////////////////////////
|
sl@0
|
275 |
template <typename TupleT>
|
sl@0
|
276 |
struct tuple_element<5, TupleT>
|
sl@0
|
277 |
{
|
sl@0
|
278 |
typedef typename TupleT::f_type type;
|
sl@0
|
279 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
280 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
281 |
|
sl@0
|
282 |
static rtype get(TupleT& t) { return t.f; }
|
sl@0
|
283 |
static crtype get(TupleT const& t) { return t.f; }
|
sl@0
|
284 |
};
|
sl@0
|
285 |
|
sl@0
|
286 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
287 |
//////////////////////////////////
|
sl@0
|
288 |
template <typename TupleT>
|
sl@0
|
289 |
struct tuple_element<6, TupleT>
|
sl@0
|
290 |
{
|
sl@0
|
291 |
typedef typename TupleT::g_type type;
|
sl@0
|
292 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
293 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
294 |
|
sl@0
|
295 |
static rtype get(TupleT& t) { return t.g; }
|
sl@0
|
296 |
static crtype get(TupleT const& t) { return t.g; }
|
sl@0
|
297 |
};
|
sl@0
|
298 |
|
sl@0
|
299 |
//////////////////////////////////
|
sl@0
|
300 |
template <typename TupleT>
|
sl@0
|
301 |
struct tuple_element<7, TupleT>
|
sl@0
|
302 |
{
|
sl@0
|
303 |
typedef typename TupleT::h_type type;
|
sl@0
|
304 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
305 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
306 |
|
sl@0
|
307 |
static rtype get(TupleT& t) { return t.h; }
|
sl@0
|
308 |
static crtype get(TupleT const& t) { return t.h; }
|
sl@0
|
309 |
};
|
sl@0
|
310 |
|
sl@0
|
311 |
//////////////////////////////////
|
sl@0
|
312 |
template <typename TupleT>
|
sl@0
|
313 |
struct tuple_element<8, TupleT>
|
sl@0
|
314 |
{
|
sl@0
|
315 |
typedef typename TupleT::i_type type;
|
sl@0
|
316 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
317 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
318 |
|
sl@0
|
319 |
static rtype get(TupleT& t) { return t.i; }
|
sl@0
|
320 |
static crtype get(TupleT const& t) { return t.i; }
|
sl@0
|
321 |
};
|
sl@0
|
322 |
|
sl@0
|
323 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
324 |
//////////////////////////////////
|
sl@0
|
325 |
template <typename TupleT>
|
sl@0
|
326 |
struct tuple_element<9, TupleT>
|
sl@0
|
327 |
{
|
sl@0
|
328 |
typedef typename TupleT::j_type type;
|
sl@0
|
329 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
330 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
331 |
|
sl@0
|
332 |
static rtype get(TupleT& t) { return t.j; }
|
sl@0
|
333 |
static crtype get(TupleT const& t) { return t.j; }
|
sl@0
|
334 |
};
|
sl@0
|
335 |
|
sl@0
|
336 |
//////////////////////////////////
|
sl@0
|
337 |
template <typename TupleT>
|
sl@0
|
338 |
struct tuple_element<10, TupleT>
|
sl@0
|
339 |
{
|
sl@0
|
340 |
typedef typename TupleT::k_type type;
|
sl@0
|
341 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
342 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
343 |
|
sl@0
|
344 |
static rtype get(TupleT& t) { return t.k; }
|
sl@0
|
345 |
static crtype get(TupleT const& t) { return t.k; }
|
sl@0
|
346 |
};
|
sl@0
|
347 |
|
sl@0
|
348 |
//////////////////////////////////
|
sl@0
|
349 |
template <typename TupleT>
|
sl@0
|
350 |
struct tuple_element<11, TupleT>
|
sl@0
|
351 |
{
|
sl@0
|
352 |
typedef typename TupleT::l_type type;
|
sl@0
|
353 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
354 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
355 |
|
sl@0
|
356 |
static rtype get(TupleT& t) { return t.l; }
|
sl@0
|
357 |
static crtype get(TupleT const& t) { return t.l; }
|
sl@0
|
358 |
};
|
sl@0
|
359 |
|
sl@0
|
360 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
361 |
//////////////////////////////////
|
sl@0
|
362 |
template <typename TupleT>
|
sl@0
|
363 |
struct tuple_element<12, TupleT>
|
sl@0
|
364 |
{
|
sl@0
|
365 |
typedef typename TupleT::m_type type;
|
sl@0
|
366 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
367 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
368 |
|
sl@0
|
369 |
static rtype get(TupleT& t) { return t.m; }
|
sl@0
|
370 |
static crtype get(TupleT const& t) { return t.m; }
|
sl@0
|
371 |
};
|
sl@0
|
372 |
|
sl@0
|
373 |
//////////////////////////////////
|
sl@0
|
374 |
template <typename TupleT>
|
sl@0
|
375 |
struct tuple_element<13, TupleT>
|
sl@0
|
376 |
{
|
sl@0
|
377 |
typedef typename TupleT::n_type type;
|
sl@0
|
378 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
379 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
380 |
|
sl@0
|
381 |
static rtype get(TupleT& t) { return t.n; }
|
sl@0
|
382 |
static crtype get(TupleT const& t) { return t.n; }
|
sl@0
|
383 |
};
|
sl@0
|
384 |
|
sl@0
|
385 |
//////////////////////////////////
|
sl@0
|
386 |
template <typename TupleT>
|
sl@0
|
387 |
struct tuple_element<14, TupleT>
|
sl@0
|
388 |
{
|
sl@0
|
389 |
typedef typename TupleT::o_type type;
|
sl@0
|
390 |
typedef typename impl::access<type>::type rtype;
|
sl@0
|
391 |
typedef typename impl::access<type>::ctype crtype;
|
sl@0
|
392 |
|
sl@0
|
393 |
static rtype get(TupleT& t) { return t.o; }
|
sl@0
|
394 |
static crtype get(TupleT const& t) { return t.o; }
|
sl@0
|
395 |
};
|
sl@0
|
396 |
|
sl@0
|
397 |
#endif
|
sl@0
|
398 |
#endif
|
sl@0
|
399 |
#endif
|
sl@0
|
400 |
#endif
|
sl@0
|
401 |
|
sl@0
|
402 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
403 |
//
|
sl@0
|
404 |
// tuple forward declaration.
|
sl@0
|
405 |
//
|
sl@0
|
406 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
407 |
template <
|
sl@0
|
408 |
typename A = nil_t
|
sl@0
|
409 |
, typename B = nil_t
|
sl@0
|
410 |
, typename C = nil_t
|
sl@0
|
411 |
|
sl@0
|
412 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
413 |
, typename D = nil_t
|
sl@0
|
414 |
, typename E = nil_t
|
sl@0
|
415 |
, typename F = nil_t
|
sl@0
|
416 |
|
sl@0
|
417 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
418 |
, typename G = nil_t
|
sl@0
|
419 |
, typename H = nil_t
|
sl@0
|
420 |
, typename I = nil_t
|
sl@0
|
421 |
|
sl@0
|
422 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
423 |
, typename J = nil_t
|
sl@0
|
424 |
, typename K = nil_t
|
sl@0
|
425 |
, typename L = nil_t
|
sl@0
|
426 |
|
sl@0
|
427 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
428 |
, typename M = nil_t
|
sl@0
|
429 |
, typename N = nil_t
|
sl@0
|
430 |
, typename O = nil_t
|
sl@0
|
431 |
|
sl@0
|
432 |
#endif
|
sl@0
|
433 |
#endif
|
sl@0
|
434 |
#endif
|
sl@0
|
435 |
#endif
|
sl@0
|
436 |
|
sl@0
|
437 |
, typename NU = nil_t // Not used
|
sl@0
|
438 |
>
|
sl@0
|
439 |
struct tuple;
|
sl@0
|
440 |
|
sl@0
|
441 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
442 |
//
|
sl@0
|
443 |
// tuple_index
|
sl@0
|
444 |
//
|
sl@0
|
445 |
// This class wraps an integer in a type to be used for indexing
|
sl@0
|
446 |
// the Nth element in a tuple. See tuple operator[]. Some
|
sl@0
|
447 |
// predefined names are provided in sub-namespace
|
sl@0
|
448 |
// tuple_index_names.
|
sl@0
|
449 |
//
|
sl@0
|
450 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
451 |
template <int N>
|
sl@0
|
452 |
struct tuple_index {};
|
sl@0
|
453 |
|
sl@0
|
454 |
//////////////////////////////////
|
sl@0
|
455 |
namespace tuple_index_names {
|
sl@0
|
456 |
|
sl@0
|
457 |
tuple_index<0> const _1 = tuple_index<0>();
|
sl@0
|
458 |
tuple_index<1> const _2 = tuple_index<1>();
|
sl@0
|
459 |
tuple_index<2> const _3 = tuple_index<2>();
|
sl@0
|
460 |
|
sl@0
|
461 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
462 |
tuple_index<3> const _4 = tuple_index<3>();
|
sl@0
|
463 |
tuple_index<4> const _5 = tuple_index<4>();
|
sl@0
|
464 |
tuple_index<5> const _6 = tuple_index<5>();
|
sl@0
|
465 |
|
sl@0
|
466 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
467 |
tuple_index<6> const _7 = tuple_index<6>();
|
sl@0
|
468 |
tuple_index<7> const _8 = tuple_index<7>();
|
sl@0
|
469 |
tuple_index<8> const _9 = tuple_index<8>();
|
sl@0
|
470 |
|
sl@0
|
471 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
472 |
tuple_index<9> const _10 = tuple_index<9>();
|
sl@0
|
473 |
tuple_index<10> const _11 = tuple_index<10>();
|
sl@0
|
474 |
tuple_index<11> const _12 = tuple_index<11>();
|
sl@0
|
475 |
|
sl@0
|
476 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
477 |
tuple_index<12> const _13 = tuple_index<12>();
|
sl@0
|
478 |
tuple_index<13> const _14 = tuple_index<13>();
|
sl@0
|
479 |
tuple_index<14> const _15 = tuple_index<14>();
|
sl@0
|
480 |
|
sl@0
|
481 |
#endif
|
sl@0
|
482 |
#endif
|
sl@0
|
483 |
#endif
|
sl@0
|
484 |
#endif
|
sl@0
|
485 |
}
|
sl@0
|
486 |
|
sl@0
|
487 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
488 |
//
|
sl@0
|
489 |
// tuple_common class
|
sl@0
|
490 |
//
|
sl@0
|
491 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
492 |
template <typename DerivedT>
|
sl@0
|
493 |
struct tuple_base {
|
sl@0
|
494 |
|
sl@0
|
495 |
typedef nil_t a_type;
|
sl@0
|
496 |
typedef nil_t b_type;
|
sl@0
|
497 |
typedef nil_t c_type;
|
sl@0
|
498 |
|
sl@0
|
499 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
500 |
typedef nil_t d_type;
|
sl@0
|
501 |
typedef nil_t e_type;
|
sl@0
|
502 |
typedef nil_t f_type;
|
sl@0
|
503 |
|
sl@0
|
504 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
505 |
typedef nil_t g_type;
|
sl@0
|
506 |
typedef nil_t h_type;
|
sl@0
|
507 |
typedef nil_t i_type;
|
sl@0
|
508 |
|
sl@0
|
509 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
510 |
typedef nil_t j_type;
|
sl@0
|
511 |
typedef nil_t k_type;
|
sl@0
|
512 |
typedef nil_t l_type;
|
sl@0
|
513 |
|
sl@0
|
514 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
515 |
typedef nil_t m_type;
|
sl@0
|
516 |
typedef nil_t n_type;
|
sl@0
|
517 |
typedef nil_t o_type;
|
sl@0
|
518 |
|
sl@0
|
519 |
#endif
|
sl@0
|
520 |
#endif
|
sl@0
|
521 |
#endif
|
sl@0
|
522 |
#endif
|
sl@0
|
523 |
|
sl@0
|
524 |
template <int N>
|
sl@0
|
525 |
typename tuple_element<N, DerivedT>::crtype
|
sl@0
|
526 |
operator[](tuple_index<N>) const
|
sl@0
|
527 |
{
|
sl@0
|
528 |
return tuple_element<N, DerivedT>
|
sl@0
|
529 |
::get(*static_cast<DerivedT const*>(this));
|
sl@0
|
530 |
}
|
sl@0
|
531 |
|
sl@0
|
532 |
template <int N>
|
sl@0
|
533 |
typename tuple_element<N, DerivedT>::rtype
|
sl@0
|
534 |
operator[](tuple_index<N>)
|
sl@0
|
535 |
{
|
sl@0
|
536 |
return tuple_element<N, DerivedT>
|
sl@0
|
537 |
::get(*static_cast<DerivedT*>(this));
|
sl@0
|
538 |
}
|
sl@0
|
539 |
};
|
sl@0
|
540 |
|
sl@0
|
541 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
542 |
//
|
sl@0
|
543 |
// tuple <0 member> class
|
sl@0
|
544 |
//
|
sl@0
|
545 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
546 |
template <>
|
sl@0
|
547 |
struct tuple<>
|
sl@0
|
548 |
: public tuple_base<tuple<> > {
|
sl@0
|
549 |
|
sl@0
|
550 |
BOOST_STATIC_CONSTANT(int, length = 0);
|
sl@0
|
551 |
};
|
sl@0
|
552 |
|
sl@0
|
553 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
554 |
//
|
sl@0
|
555 |
// tuple <1 member> class
|
sl@0
|
556 |
//
|
sl@0
|
557 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
558 |
template <typename A>
|
sl@0
|
559 |
struct tuple<A, nil_t, nil_t,
|
sl@0
|
560 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
561 |
nil_t, nil_t, nil_t,
|
sl@0
|
562 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
563 |
nil_t, nil_t, nil_t,
|
sl@0
|
564 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
565 |
nil_t, nil_t, nil_t,
|
sl@0
|
566 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
567 |
nil_t, nil_t, nil_t,
|
sl@0
|
568 |
#endif
|
sl@0
|
569 |
#endif
|
sl@0
|
570 |
#endif
|
sl@0
|
571 |
#endif
|
sl@0
|
572 |
nil_t // Unused
|
sl@0
|
573 |
>
|
sl@0
|
574 |
: public tuple_base<tuple<A> > {
|
sl@0
|
575 |
|
sl@0
|
576 |
BOOST_STATIC_CONSTANT(int, length = 1);
|
sl@0
|
577 |
typedef A a_type;
|
sl@0
|
578 |
|
sl@0
|
579 |
tuple() {}
|
sl@0
|
580 |
|
sl@0
|
581 |
tuple(
|
sl@0
|
582 |
typename call_traits<A>::param_type a_
|
sl@0
|
583 |
): a(a_) {}
|
sl@0
|
584 |
|
sl@0
|
585 |
template <typename TupleT>
|
sl@0
|
586 |
tuple(TupleT const& init)
|
sl@0
|
587 |
: a(init[tuple_index<0>()])
|
sl@0
|
588 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
589 |
|
sl@0
|
590 |
A a;
|
sl@0
|
591 |
};
|
sl@0
|
592 |
|
sl@0
|
593 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
594 |
//
|
sl@0
|
595 |
// tuple <2 member> class
|
sl@0
|
596 |
//
|
sl@0
|
597 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
598 |
template <typename A, typename B>
|
sl@0
|
599 |
struct tuple<A, B, nil_t,
|
sl@0
|
600 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
601 |
nil_t, nil_t, nil_t,
|
sl@0
|
602 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
603 |
nil_t, nil_t, nil_t,
|
sl@0
|
604 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
605 |
nil_t, nil_t, nil_t,
|
sl@0
|
606 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
607 |
nil_t, nil_t, nil_t,
|
sl@0
|
608 |
#endif
|
sl@0
|
609 |
#endif
|
sl@0
|
610 |
#endif
|
sl@0
|
611 |
#endif
|
sl@0
|
612 |
nil_t // Unused
|
sl@0
|
613 |
>
|
sl@0
|
614 |
: public tuple_base<tuple<A, B> > {
|
sl@0
|
615 |
|
sl@0
|
616 |
BOOST_STATIC_CONSTANT(int, length = 2);
|
sl@0
|
617 |
typedef A a_type; typedef B b_type;
|
sl@0
|
618 |
|
sl@0
|
619 |
tuple() {}
|
sl@0
|
620 |
|
sl@0
|
621 |
tuple(
|
sl@0
|
622 |
typename call_traits<A>::param_type a_,
|
sl@0
|
623 |
typename call_traits<B>::param_type b_
|
sl@0
|
624 |
): a(a_), b(b_) {}
|
sl@0
|
625 |
|
sl@0
|
626 |
template <typename TupleT>
|
sl@0
|
627 |
tuple(TupleT const& init)
|
sl@0
|
628 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()])
|
sl@0
|
629 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
630 |
|
sl@0
|
631 |
A a; B b;
|
sl@0
|
632 |
};
|
sl@0
|
633 |
|
sl@0
|
634 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
635 |
//
|
sl@0
|
636 |
// tuple <3 member> class
|
sl@0
|
637 |
//
|
sl@0
|
638 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
639 |
template <typename A, typename B, typename C>
|
sl@0
|
640 |
struct tuple<A, B, C,
|
sl@0
|
641 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
642 |
nil_t, nil_t, nil_t,
|
sl@0
|
643 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
644 |
nil_t, nil_t, nil_t,
|
sl@0
|
645 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
646 |
nil_t, nil_t, nil_t,
|
sl@0
|
647 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
648 |
nil_t, nil_t, nil_t,
|
sl@0
|
649 |
#endif
|
sl@0
|
650 |
#endif
|
sl@0
|
651 |
#endif
|
sl@0
|
652 |
#endif
|
sl@0
|
653 |
nil_t // Unused
|
sl@0
|
654 |
>
|
sl@0
|
655 |
: public tuple_base<tuple<A, B, C> > {
|
sl@0
|
656 |
|
sl@0
|
657 |
BOOST_STATIC_CONSTANT(int, length = 3);
|
sl@0
|
658 |
typedef A a_type; typedef B b_type;
|
sl@0
|
659 |
typedef C c_type;
|
sl@0
|
660 |
|
sl@0
|
661 |
tuple() {}
|
sl@0
|
662 |
|
sl@0
|
663 |
tuple(
|
sl@0
|
664 |
typename call_traits<A>::param_type a_,
|
sl@0
|
665 |
typename call_traits<B>::param_type b_,
|
sl@0
|
666 |
typename call_traits<C>::param_type c_
|
sl@0
|
667 |
): a(a_), b(b_), c(c_) {}
|
sl@0
|
668 |
|
sl@0
|
669 |
template <typename TupleT>
|
sl@0
|
670 |
tuple(TupleT const& init)
|
sl@0
|
671 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
672 |
c(init[tuple_index<2>()])
|
sl@0
|
673 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
674 |
|
sl@0
|
675 |
A a; B b; C c;
|
sl@0
|
676 |
};
|
sl@0
|
677 |
|
sl@0
|
678 |
#if PHOENIX_LIMIT > 3
|
sl@0
|
679 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
680 |
//
|
sl@0
|
681 |
// tuple <4 member> class
|
sl@0
|
682 |
//
|
sl@0
|
683 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
684 |
template <typename A, typename B, typename C, typename D>
|
sl@0
|
685 |
struct tuple<A, B, C, D, nil_t, nil_t,
|
sl@0
|
686 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
687 |
nil_t, nil_t, nil_t,
|
sl@0
|
688 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
689 |
nil_t, nil_t, nil_t,
|
sl@0
|
690 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
691 |
nil_t, nil_t, nil_t,
|
sl@0
|
692 |
#endif
|
sl@0
|
693 |
#endif
|
sl@0
|
694 |
#endif
|
sl@0
|
695 |
nil_t // Unused
|
sl@0
|
696 |
>
|
sl@0
|
697 |
: public tuple_base<tuple<A, B, C, D> > {
|
sl@0
|
698 |
|
sl@0
|
699 |
BOOST_STATIC_CONSTANT(int, length = 4);
|
sl@0
|
700 |
typedef A a_type; typedef B b_type;
|
sl@0
|
701 |
typedef C c_type; typedef D d_type;
|
sl@0
|
702 |
|
sl@0
|
703 |
tuple() {}
|
sl@0
|
704 |
|
sl@0
|
705 |
tuple(
|
sl@0
|
706 |
typename call_traits<A>::param_type a_,
|
sl@0
|
707 |
typename call_traits<B>::param_type b_,
|
sl@0
|
708 |
typename call_traits<C>::param_type c_,
|
sl@0
|
709 |
typename call_traits<D>::param_type d_
|
sl@0
|
710 |
): a(a_), b(b_), c(c_), d(d_) {}
|
sl@0
|
711 |
|
sl@0
|
712 |
template <typename TupleT>
|
sl@0
|
713 |
tuple(TupleT const& init)
|
sl@0
|
714 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
715 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()])
|
sl@0
|
716 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
717 |
|
sl@0
|
718 |
A a; B b; C c; D d;
|
sl@0
|
719 |
};
|
sl@0
|
720 |
|
sl@0
|
721 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
722 |
//
|
sl@0
|
723 |
// tuple <5 member> class
|
sl@0
|
724 |
//
|
sl@0
|
725 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
726 |
template <typename A, typename B, typename C, typename D, typename E>
|
sl@0
|
727 |
struct tuple<A, B, C, D, E, nil_t,
|
sl@0
|
728 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
729 |
nil_t, nil_t, nil_t,
|
sl@0
|
730 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
731 |
nil_t, nil_t, nil_t,
|
sl@0
|
732 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
733 |
nil_t, nil_t, nil_t,
|
sl@0
|
734 |
#endif
|
sl@0
|
735 |
#endif
|
sl@0
|
736 |
#endif
|
sl@0
|
737 |
nil_t // Unused
|
sl@0
|
738 |
>
|
sl@0
|
739 |
: public tuple_base<tuple<A, B, C, D, E> > {
|
sl@0
|
740 |
|
sl@0
|
741 |
BOOST_STATIC_CONSTANT(int, length = 5);
|
sl@0
|
742 |
typedef A a_type; typedef B b_type;
|
sl@0
|
743 |
typedef C c_type; typedef D d_type;
|
sl@0
|
744 |
typedef E e_type;
|
sl@0
|
745 |
|
sl@0
|
746 |
tuple() {}
|
sl@0
|
747 |
|
sl@0
|
748 |
tuple(
|
sl@0
|
749 |
typename call_traits<A>::param_type a_,
|
sl@0
|
750 |
typename call_traits<B>::param_type b_,
|
sl@0
|
751 |
typename call_traits<C>::param_type c_,
|
sl@0
|
752 |
typename call_traits<D>::param_type d_,
|
sl@0
|
753 |
typename call_traits<E>::param_type e_
|
sl@0
|
754 |
): a(a_), b(b_), c(c_), d(d_), e(e_) {}
|
sl@0
|
755 |
|
sl@0
|
756 |
template <typename TupleT>
|
sl@0
|
757 |
tuple(TupleT const& init)
|
sl@0
|
758 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
759 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
760 |
e(init[tuple_index<4>()])
|
sl@0
|
761 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
762 |
|
sl@0
|
763 |
A a; B b; C c; D d; E e;
|
sl@0
|
764 |
};
|
sl@0
|
765 |
|
sl@0
|
766 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
767 |
//
|
sl@0
|
768 |
// tuple <6 member> class
|
sl@0
|
769 |
//
|
sl@0
|
770 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
771 |
template <
|
sl@0
|
772 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
773 |
typename F>
|
sl@0
|
774 |
struct tuple<A, B, C, D, E, F,
|
sl@0
|
775 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
776 |
nil_t, nil_t, nil_t,
|
sl@0
|
777 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
778 |
nil_t, nil_t, nil_t,
|
sl@0
|
779 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
780 |
nil_t, nil_t, nil_t,
|
sl@0
|
781 |
#endif
|
sl@0
|
782 |
#endif
|
sl@0
|
783 |
#endif
|
sl@0
|
784 |
nil_t // Unused
|
sl@0
|
785 |
>
|
sl@0
|
786 |
: public tuple_base<tuple<A, B, C, D, E, F> > {
|
sl@0
|
787 |
|
sl@0
|
788 |
BOOST_STATIC_CONSTANT(int, length = 6);
|
sl@0
|
789 |
typedef A a_type; typedef B b_type;
|
sl@0
|
790 |
typedef C c_type; typedef D d_type;
|
sl@0
|
791 |
typedef E e_type; typedef F f_type;
|
sl@0
|
792 |
|
sl@0
|
793 |
tuple() {}
|
sl@0
|
794 |
|
sl@0
|
795 |
tuple(
|
sl@0
|
796 |
typename call_traits<A>::param_type a_,
|
sl@0
|
797 |
typename call_traits<B>::param_type b_,
|
sl@0
|
798 |
typename call_traits<C>::param_type c_,
|
sl@0
|
799 |
typename call_traits<D>::param_type d_,
|
sl@0
|
800 |
typename call_traits<E>::param_type e_,
|
sl@0
|
801 |
typename call_traits<F>::param_type f_
|
sl@0
|
802 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
803 |
f(f_) {}
|
sl@0
|
804 |
|
sl@0
|
805 |
template <typename TupleT>
|
sl@0
|
806 |
tuple(TupleT const& init)
|
sl@0
|
807 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
808 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
809 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()])
|
sl@0
|
810 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
811 |
|
sl@0
|
812 |
A a; B b; C c; D d; E e;
|
sl@0
|
813 |
F f;
|
sl@0
|
814 |
};
|
sl@0
|
815 |
|
sl@0
|
816 |
#if PHOENIX_LIMIT > 6
|
sl@0
|
817 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
818 |
//
|
sl@0
|
819 |
// tuple <7 member> class
|
sl@0
|
820 |
//
|
sl@0
|
821 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
822 |
template <
|
sl@0
|
823 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
824 |
typename F, typename G>
|
sl@0
|
825 |
struct tuple<A, B, C, D, E, F, G, nil_t, nil_t,
|
sl@0
|
826 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
827 |
nil_t, nil_t, nil_t,
|
sl@0
|
828 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
829 |
nil_t, nil_t, nil_t,
|
sl@0
|
830 |
#endif
|
sl@0
|
831 |
#endif
|
sl@0
|
832 |
nil_t // Unused
|
sl@0
|
833 |
>
|
sl@0
|
834 |
: public tuple_base<tuple<A, B, C, D, E, F, G> > {
|
sl@0
|
835 |
|
sl@0
|
836 |
BOOST_STATIC_CONSTANT(int, length = 7);
|
sl@0
|
837 |
typedef A a_type; typedef B b_type;
|
sl@0
|
838 |
typedef C c_type; typedef D d_type;
|
sl@0
|
839 |
typedef E e_type; typedef F f_type;
|
sl@0
|
840 |
typedef G g_type;
|
sl@0
|
841 |
|
sl@0
|
842 |
tuple() {}
|
sl@0
|
843 |
|
sl@0
|
844 |
tuple(
|
sl@0
|
845 |
typename call_traits<A>::param_type a_,
|
sl@0
|
846 |
typename call_traits<B>::param_type b_,
|
sl@0
|
847 |
typename call_traits<C>::param_type c_,
|
sl@0
|
848 |
typename call_traits<D>::param_type d_,
|
sl@0
|
849 |
typename call_traits<E>::param_type e_,
|
sl@0
|
850 |
typename call_traits<F>::param_type f_,
|
sl@0
|
851 |
typename call_traits<G>::param_type g_
|
sl@0
|
852 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
853 |
f(f_), g(g_) {}
|
sl@0
|
854 |
|
sl@0
|
855 |
template <typename TupleT>
|
sl@0
|
856 |
tuple(TupleT const& init)
|
sl@0
|
857 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
858 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
859 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
860 |
g(init[tuple_index<6>()])
|
sl@0
|
861 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
862 |
|
sl@0
|
863 |
A a; B b; C c; D d; E e;
|
sl@0
|
864 |
F f; G g;
|
sl@0
|
865 |
};
|
sl@0
|
866 |
|
sl@0
|
867 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
868 |
//
|
sl@0
|
869 |
// tuple <8 member> class
|
sl@0
|
870 |
//
|
sl@0
|
871 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
872 |
template <
|
sl@0
|
873 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
874 |
typename F, typename G, typename H>
|
sl@0
|
875 |
struct tuple<A, B, C, D, E, F, G, H, nil_t,
|
sl@0
|
876 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
877 |
nil_t, nil_t, nil_t,
|
sl@0
|
878 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
879 |
nil_t, nil_t, nil_t,
|
sl@0
|
880 |
#endif
|
sl@0
|
881 |
#endif
|
sl@0
|
882 |
nil_t // Unused
|
sl@0
|
883 |
>
|
sl@0
|
884 |
: public tuple_base<tuple<A, B, C, D, E, F, G, H> > {
|
sl@0
|
885 |
|
sl@0
|
886 |
BOOST_STATIC_CONSTANT(int, length = 8);
|
sl@0
|
887 |
typedef A a_type; typedef B b_type;
|
sl@0
|
888 |
typedef C c_type; typedef D d_type;
|
sl@0
|
889 |
typedef E e_type; typedef F f_type;
|
sl@0
|
890 |
typedef G g_type; typedef H h_type;
|
sl@0
|
891 |
|
sl@0
|
892 |
tuple() {}
|
sl@0
|
893 |
|
sl@0
|
894 |
tuple(
|
sl@0
|
895 |
typename call_traits<A>::param_type a_,
|
sl@0
|
896 |
typename call_traits<B>::param_type b_,
|
sl@0
|
897 |
typename call_traits<C>::param_type c_,
|
sl@0
|
898 |
typename call_traits<D>::param_type d_,
|
sl@0
|
899 |
typename call_traits<E>::param_type e_,
|
sl@0
|
900 |
typename call_traits<F>::param_type f_,
|
sl@0
|
901 |
typename call_traits<G>::param_type g_,
|
sl@0
|
902 |
typename call_traits<H>::param_type h_
|
sl@0
|
903 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
904 |
f(f_), g(g_), h(h_) {}
|
sl@0
|
905 |
|
sl@0
|
906 |
template <typename TupleT>
|
sl@0
|
907 |
tuple(TupleT const& init)
|
sl@0
|
908 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
909 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
910 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
911 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()])
|
sl@0
|
912 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
913 |
|
sl@0
|
914 |
A a; B b; C c; D d; E e;
|
sl@0
|
915 |
F f; G g; H h;
|
sl@0
|
916 |
};
|
sl@0
|
917 |
|
sl@0
|
918 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
919 |
//
|
sl@0
|
920 |
// tuple <9 member> class
|
sl@0
|
921 |
//
|
sl@0
|
922 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
923 |
template <
|
sl@0
|
924 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
925 |
typename F, typename G, typename H, typename I>
|
sl@0
|
926 |
struct tuple<A, B, C, D, E, F, G, H, I,
|
sl@0
|
927 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
928 |
nil_t, nil_t, nil_t,
|
sl@0
|
929 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
930 |
nil_t, nil_t, nil_t,
|
sl@0
|
931 |
#endif
|
sl@0
|
932 |
#endif
|
sl@0
|
933 |
nil_t // Unused
|
sl@0
|
934 |
>
|
sl@0
|
935 |
: public tuple_base<tuple<A, B, C, D, E, F, G, H, I> > {
|
sl@0
|
936 |
|
sl@0
|
937 |
BOOST_STATIC_CONSTANT(int, length = 9);
|
sl@0
|
938 |
typedef A a_type; typedef B b_type;
|
sl@0
|
939 |
typedef C c_type; typedef D d_type;
|
sl@0
|
940 |
typedef E e_type; typedef F f_type;
|
sl@0
|
941 |
typedef G g_type; typedef H h_type;
|
sl@0
|
942 |
typedef I i_type;
|
sl@0
|
943 |
|
sl@0
|
944 |
tuple() {}
|
sl@0
|
945 |
|
sl@0
|
946 |
tuple(
|
sl@0
|
947 |
typename call_traits<A>::param_type a_,
|
sl@0
|
948 |
typename call_traits<B>::param_type b_,
|
sl@0
|
949 |
typename call_traits<C>::param_type c_,
|
sl@0
|
950 |
typename call_traits<D>::param_type d_,
|
sl@0
|
951 |
typename call_traits<E>::param_type e_,
|
sl@0
|
952 |
typename call_traits<F>::param_type f_,
|
sl@0
|
953 |
typename call_traits<G>::param_type g_,
|
sl@0
|
954 |
typename call_traits<H>::param_type h_,
|
sl@0
|
955 |
typename call_traits<I>::param_type i_
|
sl@0
|
956 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
957 |
f(f_), g(g_), h(h_), i(i_) {}
|
sl@0
|
958 |
|
sl@0
|
959 |
template <typename TupleT>
|
sl@0
|
960 |
tuple(TupleT const& init)
|
sl@0
|
961 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
962 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
963 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
964 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
965 |
i(init[tuple_index<8>()])
|
sl@0
|
966 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
967 |
|
sl@0
|
968 |
A a; B b; C c; D d; E e;
|
sl@0
|
969 |
F f; G g; H h; I i;
|
sl@0
|
970 |
};
|
sl@0
|
971 |
|
sl@0
|
972 |
#if PHOENIX_LIMIT > 9
|
sl@0
|
973 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
974 |
//
|
sl@0
|
975 |
// tuple <10 member> class
|
sl@0
|
976 |
//
|
sl@0
|
977 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
978 |
template <
|
sl@0
|
979 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
980 |
typename F, typename G, typename H, typename I, typename J>
|
sl@0
|
981 |
struct tuple<A, B, C, D, E, F, G, H, I, J, nil_t, nil_t,
|
sl@0
|
982 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
983 |
nil_t, nil_t, nil_t,
|
sl@0
|
984 |
#endif
|
sl@0
|
985 |
nil_t // Unused
|
sl@0
|
986 |
>
|
sl@0
|
987 |
: public tuple_base<tuple<A, B, C, D, E, F, G, H, I, J> > {
|
sl@0
|
988 |
|
sl@0
|
989 |
BOOST_STATIC_CONSTANT(int, length = 10);
|
sl@0
|
990 |
typedef A a_type; typedef B b_type;
|
sl@0
|
991 |
typedef C c_type; typedef D d_type;
|
sl@0
|
992 |
typedef E e_type; typedef F f_type;
|
sl@0
|
993 |
typedef G g_type; typedef H h_type;
|
sl@0
|
994 |
typedef I i_type; typedef J j_type;
|
sl@0
|
995 |
|
sl@0
|
996 |
tuple() {}
|
sl@0
|
997 |
|
sl@0
|
998 |
tuple(
|
sl@0
|
999 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1000 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1001 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1002 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1003 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1004 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1005 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1006 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1007 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1008 |
typename call_traits<J>::param_type j_
|
sl@0
|
1009 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1010 |
f(f_), g(g_), h(h_), i(i_), j(j_) {}
|
sl@0
|
1011 |
|
sl@0
|
1012 |
template <typename TupleT>
|
sl@0
|
1013 |
tuple(TupleT const& init)
|
sl@0
|
1014 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1015 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1016 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1017 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1018 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()])
|
sl@0
|
1019 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1020 |
|
sl@0
|
1021 |
A a; B b; C c; D d; E e;
|
sl@0
|
1022 |
F f; G g; H h; I i; J j;
|
sl@0
|
1023 |
};
|
sl@0
|
1024 |
|
sl@0
|
1025 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1026 |
//
|
sl@0
|
1027 |
// tuple <11 member> class
|
sl@0
|
1028 |
//
|
sl@0
|
1029 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1030 |
template <
|
sl@0
|
1031 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
1032 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
1033 |
typename K>
|
sl@0
|
1034 |
struct tuple<A, B, C, D, E, F, G, H, I, J, K, nil_t,
|
sl@0
|
1035 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
1036 |
nil_t, nil_t, nil_t,
|
sl@0
|
1037 |
#endif
|
sl@0
|
1038 |
nil_t // Unused
|
sl@0
|
1039 |
>
|
sl@0
|
1040 |
: public tuple_base<tuple<A, B, C, D, E, F, G, H, I, J, K> > {
|
sl@0
|
1041 |
|
sl@0
|
1042 |
BOOST_STATIC_CONSTANT(int, length = 11);
|
sl@0
|
1043 |
typedef A a_type; typedef B b_type;
|
sl@0
|
1044 |
typedef C c_type; typedef D d_type;
|
sl@0
|
1045 |
typedef E e_type; typedef F f_type;
|
sl@0
|
1046 |
typedef G g_type; typedef H h_type;
|
sl@0
|
1047 |
typedef I i_type; typedef J j_type;
|
sl@0
|
1048 |
typedef K k_type;
|
sl@0
|
1049 |
|
sl@0
|
1050 |
tuple() {}
|
sl@0
|
1051 |
|
sl@0
|
1052 |
tuple(
|
sl@0
|
1053 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1054 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1055 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1056 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1057 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1058 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1059 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1060 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1061 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1062 |
typename call_traits<J>::param_type j_,
|
sl@0
|
1063 |
typename call_traits<K>::param_type k_
|
sl@0
|
1064 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1065 |
f(f_), g(g_), h(h_), i(i_), j(j_),
|
sl@0
|
1066 |
k(k_) {}
|
sl@0
|
1067 |
|
sl@0
|
1068 |
template <typename TupleT>
|
sl@0
|
1069 |
tuple(TupleT const& init)
|
sl@0
|
1070 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1071 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1072 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1073 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1074 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()]),
|
sl@0
|
1075 |
k(init[tuple_index<10>()])
|
sl@0
|
1076 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1077 |
|
sl@0
|
1078 |
A a; B b; C c; D d; E e;
|
sl@0
|
1079 |
F f; G g; H h; I i; J j;
|
sl@0
|
1080 |
K k;
|
sl@0
|
1081 |
};
|
sl@0
|
1082 |
|
sl@0
|
1083 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1084 |
//
|
sl@0
|
1085 |
// tuple <12 member> class
|
sl@0
|
1086 |
//
|
sl@0
|
1087 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1088 |
template <
|
sl@0
|
1089 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
1090 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
1091 |
typename K, typename L>
|
sl@0
|
1092 |
struct tuple<A, B, C, D, E, F, G, H, I, J, K, L,
|
sl@0
|
1093 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
1094 |
nil_t, nil_t, nil_t,
|
sl@0
|
1095 |
#endif
|
sl@0
|
1096 |
nil_t // Unused
|
sl@0
|
1097 |
>
|
sl@0
|
1098 |
: public tuple_base<tuple<A, B, C, D, E, F, G, H, I, J, K, L> > {
|
sl@0
|
1099 |
|
sl@0
|
1100 |
BOOST_STATIC_CONSTANT(int, length = 12);
|
sl@0
|
1101 |
typedef A a_type; typedef B b_type;
|
sl@0
|
1102 |
typedef C c_type; typedef D d_type;
|
sl@0
|
1103 |
typedef E e_type; typedef F f_type;
|
sl@0
|
1104 |
typedef G g_type; typedef H h_type;
|
sl@0
|
1105 |
typedef I i_type; typedef J j_type;
|
sl@0
|
1106 |
typedef K k_type; typedef L l_type;
|
sl@0
|
1107 |
|
sl@0
|
1108 |
tuple() {}
|
sl@0
|
1109 |
|
sl@0
|
1110 |
tuple(
|
sl@0
|
1111 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1112 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1113 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1114 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1115 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1116 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1117 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1118 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1119 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1120 |
typename call_traits<J>::param_type j_,
|
sl@0
|
1121 |
typename call_traits<K>::param_type k_,
|
sl@0
|
1122 |
typename call_traits<L>::param_type l_
|
sl@0
|
1123 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1124 |
f(f_), g(g_), h(h_), i(i_), j(j_),
|
sl@0
|
1125 |
k(k_), l(l_) {}
|
sl@0
|
1126 |
|
sl@0
|
1127 |
template <typename TupleT>
|
sl@0
|
1128 |
tuple(TupleT const& init)
|
sl@0
|
1129 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1130 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1131 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1132 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1133 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()]),
|
sl@0
|
1134 |
k(init[tuple_index<10>()]), l(init[tuple_index<11>()])
|
sl@0
|
1135 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1136 |
|
sl@0
|
1137 |
A a; B b; C c; D d; E e;
|
sl@0
|
1138 |
F f; G g; H h; I i; J j;
|
sl@0
|
1139 |
K k; L l;
|
sl@0
|
1140 |
};
|
sl@0
|
1141 |
|
sl@0
|
1142 |
#if PHOENIX_LIMIT > 12
|
sl@0
|
1143 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1144 |
//
|
sl@0
|
1145 |
// tuple <13 member> class
|
sl@0
|
1146 |
//
|
sl@0
|
1147 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1148 |
template <
|
sl@0
|
1149 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
1150 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
1151 |
typename K, typename L, typename M>
|
sl@0
|
1152 |
struct tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, nil_t, nil_t, nil_t>
|
sl@0
|
1153 |
: public tuple_base<
|
sl@0
|
1154 |
tuple<A, B, C, D, E, F, G, H, I, J, K, L, M> > {
|
sl@0
|
1155 |
|
sl@0
|
1156 |
BOOST_STATIC_CONSTANT(int, length = 13);
|
sl@0
|
1157 |
typedef A a_type; typedef B b_type;
|
sl@0
|
1158 |
typedef C c_type; typedef D d_type;
|
sl@0
|
1159 |
typedef E e_type; typedef F f_type;
|
sl@0
|
1160 |
typedef G g_type; typedef H h_type;
|
sl@0
|
1161 |
typedef I i_type; typedef J j_type;
|
sl@0
|
1162 |
typedef K k_type; typedef L l_type;
|
sl@0
|
1163 |
typedef M m_type;
|
sl@0
|
1164 |
|
sl@0
|
1165 |
tuple() {}
|
sl@0
|
1166 |
|
sl@0
|
1167 |
tuple(
|
sl@0
|
1168 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1169 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1170 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1171 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1172 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1173 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1174 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1175 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1176 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1177 |
typename call_traits<J>::param_type j_,
|
sl@0
|
1178 |
typename call_traits<K>::param_type k_,
|
sl@0
|
1179 |
typename call_traits<L>::param_type l_,
|
sl@0
|
1180 |
typename call_traits<M>::param_type m_
|
sl@0
|
1181 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1182 |
f(f_), g(g_), h(h_), i(i_), j(j_),
|
sl@0
|
1183 |
k(k_), l(l_), m(m_) {}
|
sl@0
|
1184 |
|
sl@0
|
1185 |
template <typename TupleT>
|
sl@0
|
1186 |
tuple(TupleT const& init)
|
sl@0
|
1187 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1188 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1189 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1190 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1191 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()]),
|
sl@0
|
1192 |
k(init[tuple_index<10>()]), l(init[tuple_index<11>()]),
|
sl@0
|
1193 |
m(init[tuple_index<12>()])
|
sl@0
|
1194 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1195 |
|
sl@0
|
1196 |
A a; B b; C c; D d; E e;
|
sl@0
|
1197 |
F f; G g; H h; I i; J j;
|
sl@0
|
1198 |
K k; L l; M m;
|
sl@0
|
1199 |
};
|
sl@0
|
1200 |
|
sl@0
|
1201 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1202 |
//
|
sl@0
|
1203 |
// tuple <14 member> class
|
sl@0
|
1204 |
//
|
sl@0
|
1205 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1206 |
template <
|
sl@0
|
1207 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
1208 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
1209 |
typename K, typename L, typename M, typename N>
|
sl@0
|
1210 |
struct tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N, nil_t, nil_t>
|
sl@0
|
1211 |
: public tuple_base<
|
sl@0
|
1212 |
tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N> > {
|
sl@0
|
1213 |
|
sl@0
|
1214 |
BOOST_STATIC_CONSTANT(int, length = 14);
|
sl@0
|
1215 |
typedef A a_type; typedef B b_type;
|
sl@0
|
1216 |
typedef C c_type; typedef D d_type;
|
sl@0
|
1217 |
typedef E e_type; typedef F f_type;
|
sl@0
|
1218 |
typedef G g_type; typedef H h_type;
|
sl@0
|
1219 |
typedef I i_type; typedef J j_type;
|
sl@0
|
1220 |
typedef K k_type; typedef L l_type;
|
sl@0
|
1221 |
typedef M m_type; typedef N n_type;
|
sl@0
|
1222 |
|
sl@0
|
1223 |
tuple() {}
|
sl@0
|
1224 |
|
sl@0
|
1225 |
tuple(
|
sl@0
|
1226 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1227 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1228 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1229 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1230 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1231 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1232 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1233 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1234 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1235 |
typename call_traits<J>::param_type j_,
|
sl@0
|
1236 |
typename call_traits<K>::param_type k_,
|
sl@0
|
1237 |
typename call_traits<L>::param_type l_,
|
sl@0
|
1238 |
typename call_traits<M>::param_type m_,
|
sl@0
|
1239 |
typename call_traits<N>::param_type n_
|
sl@0
|
1240 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1241 |
f(f_), g(g_), h(h_), i(i_), j(j_),
|
sl@0
|
1242 |
k(k_), l(l_), m(m_), n(n_) {}
|
sl@0
|
1243 |
|
sl@0
|
1244 |
template <typename TupleT>
|
sl@0
|
1245 |
tuple(TupleT const& init)
|
sl@0
|
1246 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1247 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1248 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1249 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1250 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()]),
|
sl@0
|
1251 |
k(init[tuple_index<10>()]), l(init[tuple_index<11>()]),
|
sl@0
|
1252 |
m(init[tuple_index<12>()]), n(init[tuple_index<13>()])
|
sl@0
|
1253 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1254 |
|
sl@0
|
1255 |
A a; B b; C c; D d; E e;
|
sl@0
|
1256 |
F f; G g; H h; I i; J j;
|
sl@0
|
1257 |
K k; L l; M m; N n;
|
sl@0
|
1258 |
};
|
sl@0
|
1259 |
|
sl@0
|
1260 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1261 |
//
|
sl@0
|
1262 |
// tuple <15 member> class
|
sl@0
|
1263 |
//
|
sl@0
|
1264 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1265 |
template <
|
sl@0
|
1266 |
typename A, typename B, typename C, typename D, typename E,
|
sl@0
|
1267 |
typename F, typename G, typename H, typename I, typename J,
|
sl@0
|
1268 |
typename K, typename L, typename M, typename N, typename O>
|
sl@0
|
1269 |
struct tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, nil_t>
|
sl@0
|
1270 |
: public tuple_base<
|
sl@0
|
1271 |
tuple<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> > {
|
sl@0
|
1272 |
|
sl@0
|
1273 |
BOOST_STATIC_CONSTANT(int, length = 15);
|
sl@0
|
1274 |
typedef A a_type; typedef B b_type;
|
sl@0
|
1275 |
typedef C c_type; typedef D d_type;
|
sl@0
|
1276 |
typedef E e_type; typedef F f_type;
|
sl@0
|
1277 |
typedef G g_type; typedef H h_type;
|
sl@0
|
1278 |
typedef I i_type; typedef J j_type;
|
sl@0
|
1279 |
typedef K k_type; typedef L l_type;
|
sl@0
|
1280 |
typedef M m_type; typedef N n_type;
|
sl@0
|
1281 |
typedef O o_type;
|
sl@0
|
1282 |
|
sl@0
|
1283 |
tuple() {}
|
sl@0
|
1284 |
|
sl@0
|
1285 |
tuple(
|
sl@0
|
1286 |
typename call_traits<A>::param_type a_,
|
sl@0
|
1287 |
typename call_traits<B>::param_type b_,
|
sl@0
|
1288 |
typename call_traits<C>::param_type c_,
|
sl@0
|
1289 |
typename call_traits<D>::param_type d_,
|
sl@0
|
1290 |
typename call_traits<E>::param_type e_,
|
sl@0
|
1291 |
typename call_traits<F>::param_type f_,
|
sl@0
|
1292 |
typename call_traits<G>::param_type g_,
|
sl@0
|
1293 |
typename call_traits<H>::param_type h_,
|
sl@0
|
1294 |
typename call_traits<I>::param_type i_,
|
sl@0
|
1295 |
typename call_traits<J>::param_type j_,
|
sl@0
|
1296 |
typename call_traits<K>::param_type k_,
|
sl@0
|
1297 |
typename call_traits<L>::param_type l_,
|
sl@0
|
1298 |
typename call_traits<M>::param_type m_,
|
sl@0
|
1299 |
typename call_traits<N>::param_type n_,
|
sl@0
|
1300 |
typename call_traits<O>::param_type o_
|
sl@0
|
1301 |
): a(a_), b(b_), c(c_), d(d_), e(e_),
|
sl@0
|
1302 |
f(f_), g(g_), h(h_), i(i_), j(j_),
|
sl@0
|
1303 |
k(k_), l(l_), m(m_), n(n_), o(o_) {}
|
sl@0
|
1304 |
|
sl@0
|
1305 |
template <typename TupleT>
|
sl@0
|
1306 |
tuple(TupleT const& init)
|
sl@0
|
1307 |
: a(init[tuple_index<0>()]), b(init[tuple_index<1>()]),
|
sl@0
|
1308 |
c(init[tuple_index<2>()]), d(init[tuple_index<3>()]),
|
sl@0
|
1309 |
e(init[tuple_index<4>()]), f(init[tuple_index<5>()]),
|
sl@0
|
1310 |
g(init[tuple_index<6>()]), h(init[tuple_index<7>()]),
|
sl@0
|
1311 |
i(init[tuple_index<8>()]), j(init[tuple_index<9>()]),
|
sl@0
|
1312 |
k(init[tuple_index<10>()]), l(init[tuple_index<11>()]),
|
sl@0
|
1313 |
m(init[tuple_index<12>()]), n(init[tuple_index<13>()]),
|
sl@0
|
1314 |
o(init[tuple_index<14>()])
|
sl@0
|
1315 |
{ BOOST_STATIC_ASSERT(TupleT::length == length); }
|
sl@0
|
1316 |
|
sl@0
|
1317 |
A a; B b; C c; D d; E e;
|
sl@0
|
1318 |
F f; G g; H h; I i; J j;
|
sl@0
|
1319 |
K k; L l; M m; N n; O o;
|
sl@0
|
1320 |
};
|
sl@0
|
1321 |
|
sl@0
|
1322 |
#endif
|
sl@0
|
1323 |
#endif
|
sl@0
|
1324 |
#endif
|
sl@0
|
1325 |
#endif
|
sl@0
|
1326 |
|
sl@0
|
1327 |
///////////////////////////////////////////////////////////////////////////////
|
sl@0
|
1328 |
} // namespace phoenix
|
sl@0
|
1329 |
|
sl@0
|
1330 |
#endif
|