Boost logo

Boost :

From: mfdylan (dylan_at_[hidden])
Date: 2001-12-17 18:36:35


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> Vesa,
>
> This is totally cool. However, I have a philosophical problem with
the
> preprocessor library (maybe philosophical is the wrong word): If I
have to
> debug code generated by the preprocessor library, or even
understand the
> source, I'm going to have a hard time. So far, I've been using some
Python
> scripts to generate readable, debuggable C++ when neccessary. I
also have
> had some practical problems using PREPROCESSOR with Metrowerk's
broken
> preprocessor. So, I guess I'm trying to figure out when/where I'd
want to
> use Boost.PREPROCESSOR instead of my Python scripts.
>
> Looking for insight,
> Dave
>

The problem might be reduced by setting up a two-phase compile,
whereby you create a file designed to be run through the pre-
preprocessor (using whatever option your compiler has to do such a
thing), then include that into your regular source file.
The file effectively gets preprocessed twice - and you can choose
which bits you want to leave as macros and which bits you want
expanded.
I've never tried this however so it might not be that realistic in
practice.

Dylan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk