From: Maciej Sobczak (prog_at_[hidden])
Date: 2007-10-15 17:51:10
Eric Niebler wrote:
>>> I have heard unconfirmed rumors that someone has a script that
>>> takes Boost code and moves it into a different top-level namespace.
>>> Does such a script really exist?
>>> The goal is to be able to automatically munge Boost code so that
>>> several versions can be used in parallel without conflicts. If
>>> anybody is currently doing this, I'd love to hear from them.
>> To use multiple versions in parallel wouldn't you also need to mangle
>> the include guard symbol names to allow each version to
>> independently remember which headers have been processed?
> Yes, and all macro names would need to change, too.
Not only this.
Consider that some Boost file contains this:
The physical meaning of "boost/..." is resolved thanks to the
appropriate -I compiler option. If you want to have several versions in
parallel, then I presume that you want to #include them together from
your project - in which case the meaning (resolution) of "boost/..."
would need to be different in each version, so that there are physically
multiple header trees. This cannot be done with multiple -I options.
This means that not only namespace names and macros, but also #include
paths in Boost files should change to use separate path prefixes, like:
Hint: Vera++ can do this. I already have transformation scripts that do
all three tricks. They will be released together with one important bugfix.
-- Maciej Sobczak * www.msobczak.com * www.inspirel.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk