Boost logo

Boost :

Subject: Re: [boost] Cxx dual library
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2016-06-06 17:03:54


On 6 Jun 2016 at 4:52, Rob Stewart wrote:

> Vicente's approach, of I have it right, is pretty simple:
>
> namespace boost {
> namespace something {
> using std::thread;
> // or (conditionally selected)
> using boost::thread;
> } }
>
> With that, boost::something::thread is the name to use in the user's code.

Boost.BindLib, which preceded boost-lite, used exactly the pattern
you describe.

It was found, after a year of usage, to confer no practical usage
advantages over the aliases-bundled-into-a-namespace injection
technique currently employed by boost-lite, and it was considerably
harder to configure and made the config.hpp considerably more verbose
and macro heavy.

I therefore changed to the current design which is easy and terse to
configure, plus all macro magic in the config was eliminated. It's
all now standard C++ and standard macro idioms.

I may yet revert to macros for #including the bind files as those
could pick up the C++ Modules for those binds without source code
changes, but I'm still hoping to make use of the backwards
compatibility syntax proposed by WG21 P0273r0 [1] to avoid that.

Niall

[1]:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0273r0.pdf

-- 
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