Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost BCP namespace renaming : dispelling the FUD ?
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-07-19 12:22:36

> When implementing a library, one might want to neither require nor prevent
> the
> library users to also use any version of Boost.
> I believed that BCP used with namespace renaming would allow the use of
> (namespace-renamed) Boost in the implementation of such a library without
> *any*
> concern about conflict at link time and / or rub-time errors if the
> library user
> chooses to also use another Boost version.
> However, I have been reading that Boost brings some symbols that cannot be
> renamed because they are out of any namespace, with "C" linkage[*].
> This brings the following questions :
> 1) can a list all such names be found ?

Well a quick grep for extern "C" would do it?

> 2) To be *completely safe*, must I :
> 2.1) only avoid using those symbols in my library
> 2.2) avoid the boost libaries that provide such symbols
> 2.3) avoid boost libraries that depend on such symbols (how am I to find
> out
> which ?)
> 2.4) avoid boost libraries that depend on the boost libraries providing
> such
> symbols (easier to do than 2.3 with bcp, I believe).
> 2.5) Despair ! (i.e. forgo boost usage under such constraints).

No need to dispair at all ;-)

I changed bcp a while back to rename extern "C" functions that begin with a
"boost_" prefix, and nagged library authors that weren't already doing so to
make any extern "C" functions they were declaring to conform to that

So unless there have been any regressions, it should just plain work.... but
let me know if it doesn't!!


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at