|
Boost Users : |
Subject: [Boost-users] [preprocessor] extending loop limit >> 256
From: Martin Pasdzierny (martin_at_[hidden])
Date: 2010-12-29 07:01:22
Hi boost experts,
using BOOST_PP_LOCAL_ITERATE() and friends I found the maximum number
of iterations to be limited to 256.
The according values seemed to be defined in
.../preprocessor/config/limits.hpp
But changing these values does *not* have any effect on the maximum
number of iterations
...
#define BOOST_PP_LOCAL_MACRO(n) g(n);
#define BOOST_PP_LOCAL_LIMITS (1, 300 )
#include BOOST_PP_LOCAL_ITERATE()
#undef BOOST_PP_LOCAL_MACRO
#undef BOOST_PP_LOCAL_LIMITS
...
still creates:
g(1);
g(2);
g(3);
...
g(255);
g(256);
the expected:
g(257);
g(258);
...
g(299);
g(300);
are *not* generated.
Stepping through the libraries code I found the mechanisms far more
complicated than expected.
Now my question: is there any recommended procedure to increase the
iteration limitation to values like 10000 ?
I found a couple of code locations explicitly repeating code with hard
coded values from 1 ... 256.
I guess at least this code needs to be extended, but probably consistent
with some other changes.
I am thinking of a perl script to generate stuff like that, but before
working on that I'd like to get some qualified recommendations ;)
Thanks in advance,
Martin.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net