...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

template< typename T , T C1 =implementation-defined, T C2 =implementation-defined, ... , T CN =implementation-defined> struct vector_c { };

`vector_c`

is a shorcut interface whose whole purpose is to make the creation of a `vector`

of Integral Constants less verbose:

typedef vector_c<unsigned long,-1,0,1,1,-1,0,0,1,-1> data;

If `vector_c`

didn't exist, instead of the above line you would have to write this:

typedef vector< integral_c<unsigned long,-1> , integral_c<unsigned long,0> , integral_c<unsigned long,1> , integral_c<unsigned long,1> , integral_c<unsigned long,-1> , integral_c<unsigned long,0> , integral_c<unsigned long,0> , integral_c<unsigned long,1> , integral_c<unsigned long,-1> > data;

#include "boost/mpl/vector_c.hpp" #include "boost/mpl/vector/vector0_c.hpp" #include "boost/mpl/vector/vector10_c.hpp" ... #include "boost/mpl/vector/vector50_c.hpp"

Random Access Sequence, `vector`

, `list`

, `list_c`

, `range_c`

Table of Contents

Last edited July 17, 2002 8:01 am