Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-04-02 20:08:43


----- Original Message -----
From: "Aleksey Gurtovoy" :

> 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.

I wish for a pretty-formatting tool !!! I wish for one that can be
configurable to format "boost-style". Is there such a thing that
can grok modern C++ syntax?

If not, that should be a doable (I think) challenge for Spirit: A C++ to C++
converter. Anyone? JCAB?

Cheers,
--Joel


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