Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-01-07 09:19:23

Recently I discovered that setting LIMIT_SIZE > 117 with MSVC8 produces an error:

      ...typeof/vector.hpp(58) : fatal error C1009: compiler limit : macros nested
      too deeply

That's quite unfortunate because frameworks such as Spirit easily produce type
expressions too complex for this setting.

Well, we're at the preprocessor's and not the compiler's limits so we can do
something about it:

Changing the outer loops in typeof/vector.hpp to use BOOST_PP_LOCAL_ITERATE
instead of BOOST_PP_REPEAT buys us a new maximum of 238 (and the same error for
higher values, so it's still the preprocessor's limit).
While testing my hack described above I recognized that preprocessing
typeof/vector.hpp takes unpleasantly long, so I decided to kill two birds with one
stone by improving performance and pushing the limits even further. That is making
typeof/vector.hpp load preprocessed files for LIMIT_SIZE e { 50,100,150,200,250 }.
For the maximum: 250 be it - it's getting quite close to the limits of
Boost.Preprocessor (and I still don't know the maximum number of template
parameters allowed with MSVC8 ;-).

Here's my modifications:



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