Subject: [Boost-bugs] [Boost C++ Libraries] #4523: fix for #4501
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-08 14:24:46
#4523: fix for #4501
----------------------------+-----------------------------------------------
Reporter: ookami1@⦠| Owner: no-maintainer
Type: Patches | Status: new
Milestone: Boost 1.44.0 | Component: preprocessor
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
----------------------------+-----------------------------------------------
The following three patches fix issue #4501.
detail_auto_rec.patch and repetition_for.patch extend the maximum loop
count in BOOST_PP_FOR from 255 to 256.
seq_for_each.patch modifies the state of BOOST_PP_SEQ_FOR_EACH in such a
way that the calculation of the sequence size is done just once now, and
its cached value is used for loop control instead. This cuts down on the
evaluation cost especially for long sequences.
Small sequences benefit from an early-out execution path, in the frequent
case, when no outer for loop blocks iteration slots.
I manually enabled configuration flags 0x0004, 0x0010, 0x0020 (MSVC, BCC,
EDG resp.) to enforce the execution of compiler specific code under GCC,
and they compiled and executed fine, but that is only a poor replacement
for the native compilers, of course. The code for MWCC and DMG does not
conform to C90 or later, so GNU gcc could not be fooled to emulate them.
cheers
Wolf Lammen
complexity:
BOOST_CONFIG_FLAGS 0x0001 (strict)
{{{
boost 1.43.0: patched:
0 elements 345 replacements 67 replacements
1 388 105
2 431 142
4 520 216
8 710 364
16 1138 660
32 2186 1252
64 5050 2436
128 13850 4804
255 elements 43441 replacements 9503
256 failure 9540
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4523> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC