|
Boost : |
From: Bjørn Roald (bjorn_at_[hidden])
Date: 2007-10-15 18:16:29
Maciej Sobczak wrote:
> Not only this.
>
> Consider that some Boost file contains this:
>
> #include "boost/config.hpp"
> #include "boost/detail/workaround.hpp"
> // ...
>
> 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:
>
> #include "boost_X/config.hpp"
> #include "boost_X/detail/workaround.hpp"
> // ...
>
>
My bcp code does this as well. In fact I did some experimentation with
support of replacing boost with nested namespace ( boost -->
myprod::boost )and there are code to handle this giving:
#include "myprod/boost/config.hpp"
#include "myprod/boost/detail/workaround.hpp"
or whatever you specify. However the tricky part for nested namespace
support was never solved. In principle you need something that can
match end braces for the boost namespace in the code. I experimented
with xpressive for this, but I have a feeling there are much more to it
than nested brace matching. I would expect there to be unbalanced
braces due to preprosessor conditionals for one thing.
-- bjorn
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk