|
Boost : |
Subject: Re: [boost] [Config] Multiple versions of Boost
From: David Abrahams (dave_at_[hidden])
Date: 2008-09-13 22:05:44
on Fri Sep 12 2008, Sohail Somani <sohail-AT-taggedtype.net> wrote:
>> #undef BOOST_NAMESPACE_boost
>
> Indeed, you are right. Clever too :-)
>
> There is one obvious problem I see with the -DBOOST_NAMESPACE=foo
> approach: there is no way to include two versions of Boost within the
> same translation unit. Unfortunately, I don't think there would be any
> acceptable way to do this. Though I'm sure you will come back with a way
> to do it!
I think you do that by sticking each version of boost in its own
namespace, turning off the global namespace alias, and using explicit
qualification to select the version in question...
If you want to be ambitious, there's also the issue that some libraries
(or parts thereof) might want to maintain binary compatibility across
releases. Suppose that nothing in Boost.Signals changes between 1.37
and 1.38. Should that generate two sets of symbols with
non-interchangeable types?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk