Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2006-01-24 09:14:53


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Tobias Schwinger

> > Take a look at 'cat.hpp'.
> > [...]
>
> Aha - interesting! I've been wondering what this code does
> before... So it's about stabilizing the expansion order.

The EDG configuration, in case you're wondering, isn't working around any
semantic problems or bugs. Older versions of the EDG preprocessor--like the one
in Comeau's current release--have a significant flaw that prevents Chaos from
working (fixed in newer versions). However, the Boost pp-lib doesn't exploit
techniques related to it, and so the EDG configuration isn't doing a bug
workaround per se. Rather, it is a speed workaround--and a strange one.
Basically, it just adds delays. E.g. instead of

#define A(x) B(C(x))

...it does...

#define A(x) A2(x)
#define A2(x) B(C(x))

This "extra" macro, used consistently in places where arguments contain macro
expansions drastically improves the speed of that preprocessor (not that the
improves the speed enough...). I don't know exactly why, but apparently has
something to do with the data structures that EDG was using during macro
expansion.

The more you know... :)

Regards,
Paul Mensonides


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