Boost logo

Boost :

Subject: Re: [boost] Boost.Thread and Boost.Move collision
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-12-01 18:05:44


On 12/1/2011 6:34 AM, Ion Gaztañaga wrote:
> Hi,
>
> I've recently received some bugs caused by name collision between
> Boost.Move and Boost.Thread. Like many other libraries, Boost.Thread has
> its own move emulation code, and those functions are in the top-level
> namespace.
>
> I guess there is no trivial solution for this. Options:
>
> 1) Move Boost.Move elements to boost::move:: namespace
> 2) Move Boost.Thread elements to boost::thread namespace
> 3) Modify Boost.Thread to make use of Boost.Move
>
> I would like to know your opinion on this as this issue is related to
> two official Boost libraries.

Without dealing with Boost.Move versus Boost.Thread I am always for
libraries putting things into their own namespace if that does not
negatively impact the usefulness of a library, and by "negatively
impact" I do not mean the trivial extra typing of
'someNamespace::someElement' as opposed to just 'someElement'. An
end-user can always change that via the 'using namespace someNamespace'
or 'using someNamespace::someElement' when he desires. I am actually
alarmed at the Boost libraries who put names into the boost top level
namespace and see this as a very bad practice.


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