Boost logo

Boost :

Subject: Re: [boost] [Config] Multiple versions of Boost
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-09-12 20:36:55


AMDG

Sohail Somani wrote:
> Sohail Somani wrote:
> [snip]
>
>> What if Boost.Config did something like:
>>
>> #if !defined(BOOST)
>> # define BOOST boost
>> #endif
>>
>> And we replace all uses of the boost namespace with BOOST?
>>
>> Would such a patch against trunk be acceptable? What are the problems?
>>
>> I know it isn't aesthetically pleasing but it might have made this a bit
>> easier.
>>
>
> In case it isn't clear, what I meant by this is that I am willing to do
> the work to make it possible.
>

In order to make this work we need to make sure that
there is a namespace alias where appropriate:

#if !defined(BOOST_NAMESPACE)
    #define BOOST_NAMESPACE boost
#endif

#define BOOST_NAMESPACE_boost 0

#if BOOST_PP_CAT(BOOST_NAMESPACE_, BOOST_NAMESPACE)
    namespace BOOST_NAMESPACE {}
    namespace boost = BOOST_NAMESPACE;
#endif

#undef BOOST_NAMESPACE_boost

In Christ,
Steven Watanabe


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