<<<<<<< .working ======= >>>>>>> .merge-right.r57125
Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
<<<<<<< .working

vector

Description

=======
Description
>>>>>>> .merge-right.r57125

vector is a Random Access Sequence of heterogenous typed data structured as a simple struct where each element is held as a member variable. vector is the simplest of the Fusion sequence container, and in many cases the most efficient.

<<<<<<< .working

Header

=======
Header
>>>>>>> .merge-right.r57125
#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/fusion/include/vector_fwd.hpp>

// numbered forms
#include <boost/fusion/container/vector/vector10.hpp>
#include <boost/fusion/include/vector10.hpp>
#include <boost/fusion/container/vector/vector20.hpp>
#include <boost/fusion/include/vector20.hpp>
#include <boost/fusion/container/vector/vector30.hpp>
#include <boost/fusion/include/vector30.hpp>
#include <boost/fusion/container/vector/vector40.hpp>
#include <boost/fusion/include/vector40.hpp>
#include <boost/fusion/container/vector/vector50.hpp>
#include <boost/fusion/include/vector50.hpp>
<<<<<<< .working

Synopsis

=======
Synopsis
>>>>>>> .merge-right.r57125

Numbered forms

struct vector0;

template <typename T0>
struct vector1;

template <typename T0, typename T1>
struct vector2;

template <typename T0, typename T1, typename T2>
struct vector3;

...

template <typename T0, typename T1, typename T2..., typename TN>
struct vectorN;

Variadic form

template <
    typename T0 = unspecified
  , typename T1 = unspecified
  , typename T2 = unspecified
    ...
  , typename TN = unspecified
>
struct vector;

The numbered form accepts the exact number of elements. Example:

vector3<int, char, double>

The variadic form accepts 0 to FUSION_MAX_VECTOR_SIZE elements, where FUSION_MAX_VECTOR_SIZE is a user definable predefined maximum that defaults to 10. Example:

vector<int, char, double>

You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_VECTOR_SIZE 20
<<<<<<< .working

Template parameters

=======
Template parameters
>>>>>>> .merge-right.r57125

Parameter

Description

Default

T0...TN

Element types

unspecified

<<<<<<< .working

Model of


PrevUpHomeNext