|
Boost : |
From: Greg Comeau (comeau_at_[hidden])
Date: 2002-07-07 10:13:17
In article <000b01c22525$890b44f0$7772e50c_at_c161550a>,
Paul Mensonides <boost_at_[hidden]> wrote:
>It depends of the complexity. Here is an example:
>---------------
>#define XYZ(n, _) BOOST_PP_COMMA_IF(n) _ ## n
>#define ABC(n, _) BOOST_PP_COMMA_IF(n) ( BOOST_PP_REPEAT(BOOST_PP_INC(n), XYZ,
>_) )
>
>BOOST_PP_REPEAT(20, ABC, T)
>BOOST_PP_REPEAT(20, ABC, T)
> // etc. expanding it 30 times successively
>---------------
>
>This produces:
>
> (T0), (T0, T1), (T0, T1, T2), ...
>
>como --A --preprocess --timing test.cpp > test.i
> // takes about 35 seconds on my machine
>
>como --preprocess --timing test.cpp > test.i
> // takes about 27 seconds on my machine
>
>cl /P -I %BOOST_ROOT% test.cpp
> // takes <= a second on my machine (BOOST_ROOT is my own environment
>variable)
Ok, as I learn more about boost, and about what's happening internally,
some facts on my side may reveal themselves, so this might be an
on again/off again discussion.
>By the way, I like the way that Comeau C++ (I don't know about other
>EDG-preprocessors) removes the directive lines from the preprocessor output.
There's a few choices, and the default is to allow it to be re-fed
into a C compiler.
>Also, it would be helpful if error messages like "too many parameters
>in macro invocation" and "not enough parameters in macro invocation"
>actually said *which* macro invocation specifically.
Duly noted.
-- Greg Comeau 4.3.0 NEWS: New Windows Backends + 'export' IN July! Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk