Boost logo

Boost :

Subject: Re: [boost] [build] How to build a multi version non-header-library
From: Bruno Santos (bsantos_at_[hidden])
Date: 2012-01-18 06:25:59

The best approach is to use versioned namespaces, like boost::filesystem uses. If I'm not mistaken, inline namespace where introduced in C++11for this purpose.

namespace boost { namespace thread_v1 {
} }

namespace boost { namespace thread_v2 {
} }

namespace boost {
        using thread_v2::thread;
        using thread_v1::thread;

The downside is that we don't have inline namespaces in C++03, which leaves a daunting task of putting all those "using xxx;" directives.


On 18/01/2012, at 00:00, Vicente J. Botet Escriba wrote:

> Hi,
> I want to provide two versions for Boost.Thread, one using Boost.Chrono and the other not. Boost.Thread is a non-header-only library so I guess that I need to build two libraries with different names. Is there already a library in Boost in the same context on which I can base my build design? What is the simples way to do this with Any pointers to the doc?
> Thanks in advance,
> Vicente
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at