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.



ned Productions Limited Consulting

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