From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-05-09 07:08:18
Hamish Mackenzie writes:
> #define BOOST_MPL_LIMIT_VECTOR_SIZE 20
You don't need to define BOOST_MPL_LIMIT_VECTOR_SIZE if you are using a
numbered form ('vector20') -- you can just include the corresponding
header directly, e.g.
> #include "boost/mpl/vector.hpp"
> #include "boost/mpl/push_front.hpp"
> class X
> typedef boost::mpl::vector20< X, X, X, X, X, X, X, X, X, X, X, X, X, X,
> X, X, X, X, X, X > test;
> typedef boost::mpl::push_front< test, X >::type test2;
This produces a vector with 21 elements; it will work for GCC (and other
compilers with some kind of 'typeof') in the next release, however right
now to be able to programmatically extend a 'vector' up to N elements you
need to include the corresponding "vector(((N+9)/10)*10).hpp" header. In
your case above it'll be "vector30.hpp".
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk