Boost logo

Boost Users :

Subject: Re: [Boost-users] [preprocessor] extending loop limit >> 256
From: Martin Pasdzierny (martin_at_[hidden])
Date: 2010-12-29 12:57:58


C++ template based MPL is very beautiful and would be favored if
supported by the compilers we have to support. This works quite nice
with e.g. gcc 4.x, we successfully used template lists with up to 8000
items.

But: try to make some proprietary and outdated compilers (as required by
our customer) compile a template list of 10000 tokens. You may get:
- compiler does not support template recursion deeper than e.g. 16
- compiler crashes without any message (as our AS400 IBM compiler)
- compiler signals 'out of memory'
- compiler succeeds after some days of compilation time and creates
quite big binaries even in case of pure compile time statements.
All that is not acceptable.

We have to generate code supporting a large data model we can't change
(up to 10000 columns per table). The idea is to generate e.g. SQL
statements from within the C++ tool chain by appropriately #including
the text files describing the data model. If the proprietary
preprocessors fail we think of using Hartmut Kaisers 'wave' instead.

I already have some preprocessor-based code in place, but it became very
complicated and hard to maintain. I'd prefer to use a well tested and
documented framework like boost.preprocessor instead.
My question really is about the limitations of boost-preprocessor.

Thanks in advance, Martin.
On 12/29/2010 05:18 PM, Joel Falcou wrote:
> What is your use case ? If it's loop unrolling consider using a small
> template recursive-function. it'll be inlined in the same way
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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