Main Page | Modules | Namespace List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Tuple types of arbitrary length


Classes

struct  tag::T_list< C, D >
struct  tag::V_list< C, D >
struct  tag::V_tuple< A, B, C, >

Defines

#define make_tuple()   ((tag::TupleHead, ## __VA_ARGS__))
#define make_vtuple()   ((tag::V_TupleHead, ## __VA_ARGS__))
#define make_rtuple()   ((tag::R_TupleHead, ## __VA_ARGS__))

Typedefs

typedef T_list< Internal::null,
Internal::null > 
tag::T_ListEnd

Variables

const T_ListEnd tag::TupleHead = T_ListEnd(Internal::null(), Internal::null())

Detailed Description

This group containg classes for dealing with tuples (or typelists) of arbitrary length.

There are two types:

V_list is designed primarily to allow multiple return values from functions (see also tag::rpair) and can be uses as follows:

            V_tuple<int, float, char>::type func()
            {
                int i;
                float f;
                char c;

                //Function body goes here
                return make_vtuple(i, f, c);
            }

            void foo()
            {
                int a;
                float b;
                char c;

                //Call func() and collect all return values
                make_rtuple(a,b,c) = func();
                
                //a,b,c are now set.
            }

Define Documentation

 
#define make_rtuple  )     ((tag::R_TupleHead, ## __VA_ARGS__))
 

This macro is used to collect multiple return values from a function.

 
#define make_tuple  )     ((tag::TupleHead, ## __VA_ARGS__))
 

This is a variadic ``function'' which creates and returns a tuple.

 
#define make_vtuple  )     ((tag::V_TupleHead, ## __VA_ARGS__))
 

This macro is used to return multiple values from a function.


Typedef Documentation

typedef T_list<Internal::null,Internal::null> tag::T_ListEnd
 

Guard type to mark the end of the list


Variable Documentation

const T_ListEnd tag::TupleHead = T_ListEnd(Internal::null(), Internal::null()) [static]
 

The value of the end of a list


Generated on Wed Aug 8 14:30:36 2007 for TooN Algorithm Library - tag by  doxygen 1.3.9.1