Boost logo

Boost :

Subject: Re: [boost] [Config] Multiple versions of Boost
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-09-13 13:22:11


On Sat, Sep 13, 2008 at 9:37 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
> Sohail Somani wrote:
>> 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!
>
> There is actually a worse problem. Any solution involving
> a namespace alias will break code like:
>
> namespace boost {
> namespace fusion {
> namespace extension {
> template<>
> struct begin_impl<...> { ... };
> }
> }
> }

It would also break forward declarations found in user code, which are
perhaps not officially supported but I've done my share of:

namespace boost { template <class> class function; }

and others, in my own headers.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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