Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-09-24 03:38:20

Joel de Guzman wrote:
> Hi,

Hi Joel,

Sorry for the late reply.

> What's the preferred way to have a vector with more than 10
> elements? Right now I am using vectorN,

That's the one.

> but these vectors are not extensible (resizable).

They are! For instance, this one works on all supported platforms:

    #include "boost/mpl/vector/vector10.hpp"
    #include "boost/mpl/push_front.hpp"

    using namespace boost::mpl;

    typedef push_front<
        , float
>::type t; // OK

... with a caveat that on compilers which don't provide 'typeof' this one

    typedef push_front<
        , float
>::type t;

would require an additional include:

    #include "boost/mpl/vector/vector20.hpp"

> I am aware that there are some limits that we can set. My concern is
> that I wish to avoid setting some constants for fear that another
> library might also be using MPL with another set of constants. I'd
> appreciate some clarification in this area.

Does the above helps?


Boost list run by bdawes at, gregod at, cpdaniel at, john at