Boost logo

Boost :

Subject: Re: [boost] List of C++ 11 only Boost libraries and their status?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-11-24 16:26:24


On 24 Nov 2014 at 21:36, M.A. van den Berg wrote:

> > I believe Stephen Kelly has posted on this list a couple of times
> > about how CMake tries to address these issues.
>
> If the modularisation of boost takes shape then if would be useful to
> have C++11 libraries NOT unnecessarily depend on the boost version of
> C++11 libraries in order to reduce dependencies.
>
> What´s your view on that?

Soon to be proposed Boost.BindLib can solve exactly that. You need to
port your Boost library to BindLib, but after that BindLib lets you
"templatise" your choice of C++ 11 STL, including within the current
translation unit.

I have AFIO ported to BindLib, and you can mash up, in the same
compiland, any mix of the three substitutables (Thread-Atomic-Chrono,
Filesystem, ASIO) you like. Indeed, one unit test compiles multiple
"instantiations" of the AFIO unit tests into a single executable, and
executes each variant of the unit tests in turn.

Some on this list thought such a solution when I originally proposed
it might be brittle, and I was also worried it might be so. It turns
out to work surprisingly okay - all variants survive a 24 hour unit
test soak without error. I think that is a huge testament to the
quality of Boost and STL libraries, and also because namespace binds
are merely simple aliases to real implementation so any type
conflicts like trying to feed std::chrono to boost::chrono emerge
readily at compile time.

> E.g. if I wanted to make a "boost C++11 random library" then that could
> build on top of the C++11 random lib instead of the boost random lib.
> This would reduce dependencies and make the library work standalone on a
> C++11 compiler.

Soon to be proposed Boost.BindLib also provides a thin emulation of
Boost.Test, so even your unit test suite can run standalone. My aim
is for single header only standalone drop ins, so no requirements for
any particular build system. Simply git clone the Boost submodule,
include the header and off you go, though you probably will want to
precompile that header for sane build times.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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