Boost logo

Boost :

Subject: [boost] BOOST_PP_ITERATE for huge mpl and fusion
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2012-03-07 07:08:01

"Not to 50!!!" - Princess Bride

Things like mpl::vector and fusion::map have a configured limit like BOOST_MPL_LIMIT_VECTOR_SIZE.

The documentation is dodgy and doesn't mention that while it is configurable you can't really configure it to be more than 50. Many people have stumbled here:
Appearantly there are some scripts to generate these headers, but they may not work anymore.

I had to rush hack things in my code to make several containers go over 50 in one compilation scope.

#define ULTIMATE_N 70
#include <boost/mpl/vector/vector50.hpp>

namespace boost { namespace mpl {

        (3,(51, ULTIMATE_N, <boost/mpl/vector/aux_/numbered.hpp>))
# include BOOST_PP_ITERATE()


I'd really like to fix this in boost. AFAICT all I have to do is find all *50.hpp files and replace the 50 with the appropriate config limit.

I count 74 instances of this stuff going on! Mostly it's phoenix, mpl, and fusion.

So to wrap it up my questions are:
1) Do the scripts still work? Does anyone use them? Are they regularly tested?
2) Does anyone see a problem with my simple fix?


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