11 #ifndef DOXYGEN_IGNORE_INTERNAL
20 template<
template<
class,
class>
class List,
class C,
class D,
int i>
struct index_l
22 typedef typename index_l<List,
typename D::val_type,
typename D::next_type, i-1>::val_type val_type;
24 static const val_type& value(
const List<C,D>& l)
26 return index_l<List, typename D::val_type, typename D::next_type, i-1>::value(l.next);
30 template<
template<
class,
class>
class List,
class C,
class D>
struct index_l<List, C,D,0>
33 static const val_type& value(
const List<C,D>& l)
40 template<
class C,
class D>
struct length
44 len = length<typename D::val_type, typename D::next_type>::len + 1
48 template<>
struct length<null, null>
57 template<
template<
class,
class>
class List,
class C,
class D,
int i>
struct T_index_forward
61 len = length<C,D>::len
64 typedef typename index_l<List, C,D,len-i-1>::val_type val_type;
66 static const val_type& value(
const List<C,D>& l)
68 return index_l<List, C, D, len-i-1>::value(l);
247 template<
int i>
const typename Internal::T_index_forward<tag::T_list, C,D,i>::val_type&
index()
const
249 return Internal::T_index_forward<tag::T_list, C,D,i>::value(*
this);
256 typedef typename Internal::T_index_forward<tag::T_list, C,D,i>::val_type type;
276 #ifndef DOXYGEN_IGNORE_INTERNAL
284 V_list(
const C& c,
const D& d)
292 template<
int i>
const typename Internal::T_index_forward<tag::V_list, C,D,i>::val_type&
index()
const
294 return Internal::T_index_forward<tag::V_list, C,D,i>::value(*
this);
297 template<
int i>
class index_type
299 typedef typename Internal::T_index_forward<tag::V_list, C,D,i>::val_type type;
305 elements = (Internal::length<C,D>::len)
312 #ifndef DOXYGEN_IGNORE_INTERNAL
318 template<
class X,
class Y>
struct r2v
323 template<>
struct r2v<Internal::null, Internal::null>
330 #ifndef DOXYGEN_IGNORE_INTERNAL
331 template<
class C,
class D>
struct R_list
334 typedef typename Internal::r2v<C,D>::v equivalent_V_list;
335 R_list(
const R_list& );
336 void operator=(
const R_list&);
349 template<
class X> R_list<X, R_list<C, D> >
operator,(X& c)
351 return R_list<X, R_list<C, D> >(c, *
this);
354 template<
int i>
const typename Internal::T_index_forward<tag::R_list, C,D,i>::val_type&
index()
const
356 return Internal::T_index_forward<tag::R_list, C,D,i>::value(*
this);
359 template<
int i>
class index_type
361 typedef typename Internal::T_index_forward<tag::R_list, C,D,i>::val_type type;
367 elements = (Internal::length<C,D>::len)
371 template<
class X,
class Y>
friend struct R_list;
372 void operator=(
const equivalent_V_list& vlist)
380 #ifndef DOXYGEN_IGNORE_INTERNAL
381 typedef R_list<Internal::null,Internal::null> R_ListEnd;
385 static R_ListEnd R_TupleHead(Internal::nv, Internal::nv);
386 static V_ListEnd V_TupleHead(Internal::nv, Internal::nv);
387 template<
class A,
class B,
class C=Internal::null,
class D=Internal::null,
class E=Internal::null,
class F=Internal::null,
class G=Internal::null,
class H=Internal::null,
class I=Internal::null,
class J=Internal::null>
struct V_tuple
389 typedef V_list<J,V_list<I, V_list<H, V_list<G, V_list<F, V_list<E, V_list<D, V_list<C, V_list<B, V_list<A, V_ListEnd> > > > > > > > > > type;
392 template<
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H,
class I>
struct V_tuple<A,B,C,D,E,F,G,H,I,Internal::null>
397 template<
class A,
class B,
class C,
class D,
class E,
class F,
class G,
class H>
struct V_tuple<A,B,C,D,E,F,G,H,Internal::null,Internal::null>
402 template<
class A,
class B,
class C,
class D,
class E,
class F,
class G>
struct V_tuple<A,B,C,D,E,F,G,Internal::null,Internal::null,Internal::null>
407 template<
class A,
class B,
class C,
class D,
class E,
class F>
struct V_tuple<A,B,C,D,E,F,Internal::null,Internal::null,Internal::null,Internal::null>
412 template<
class A,
class B,
class C,
class D,
class E>
struct V_tuple<A,B,C,D,E,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null>
417 template<
class A,
class B,
class C,
class D>
struct V_tuple<A,B,C,D,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null>
422 template<
class A,
class B,
class C>
struct V_tuple<A,B,C,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null>
427 template<
class A,
class B>
struct V_tuple<A,B,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null,Internal::null>
436 template<
class A,
class B,
class C, ...>
struct V_tuple
457 #define make_tuple(...) ((tag::TupleHead, ## __VA_ARGS__))
462 #define make_vtuple(...) ((tag::V_TupleHead, ## __VA_ARGS__))
466 #define make_rtuple(...) ((tag::R_TupleHead, ## __VA_ARGS__))