|
Boost Users : |
Subject: Re: [Boost-users] Boost.PP: maximum length of a preprocessor macro, of PP
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-27 14:42:12
AMDG
Hicham Mouline wrote:
> I assign the list of all directories the names of which starts with a
> pattern like pattern_.... to a cmake variable which I then pass as a
> preprocessor macro:
>
> FILE(GLOB MYPROJECT_LIST_SYSTEMS RELATIVE ${CMAKE_SOURCE_DIR} system_*)
>
> MYPROJECT_LIST_SYSTEMS is then a cmake "list", a string with semicolon
> separators.
>
> I will then define a preprocessor macro MYPROJECT_LIST_SYSTEMS with the same
> contents.
>
> 1. What is the maximum length of a preprocessor macro (g++4.4, msvc2008/10)?
>
If you pass it on the command line, then you're limited by the
operating system's command line length. If you're using a response
file, there's no fixed limit that I know of.
> 2. I will create in a source file a list of class instances all with the
> same names in the passed macro.
> I reckon I can use a PP sequence, list, tuple or array. Is there any max
> length here?
>
Most of the preprocessor library is limited to 256. However,
some preprocessors blow out sooner.
> What is the fastest way in terms of PP time?
>
In Christ,
Steven Watanabe
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