Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-03 19:21:36


It's not what I'm after. I want the standard release to contain
debuggable, expanded code for the commonly-used low-repetition cases
(without the need for special user configuration), and for higher
repetition counts I would like to use the PP lib. I think all I need is:

    1. A way to say "generate it ALL with the PP lib"
    2. A tool which compares the TOKENS of two given
       preprocessor outputs and tells me if they match.

-Dave
----- Original Message -----
From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>

> David Abrahams wrote:
> > I think I've hit on the (nearly) perfect compromise for my use of
the
> > preprocessor lib. I want to write out the first few repeats
> > of a family
> > of repeated constructs by hand (for debugga- and comprehensi-
bility),
> > then generate additional repetitions as specified by a numeric macro
> > argument. The problem I've got is one of maintenance. How can I
verify
> > (preferably using the compiler or other automated tools) that my PP
> > construct generates the same code as the other one?
>
> How about a variation of the scheme used by MPL - write out the first
few
> repeats by hand (two, usually), test them, turn them into preprocessor
> library-based generator, use the compiler to generate the desired
number of
> repeats from it, pretty-format the output (not by hand :), place it in
a
> separate header, and include it conditionally into original generator
> header. If found a bug, fix it in the generator sources, re-generate
the
> pretty output, and debug it; repeat if needed :). The most troublesome
part
> here is to find good enough tool for pretty-formatting.
>
> Aleksey
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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