Boost logo

Boost :

Subject: Re: [boost] [Config] Support for switching between std:: andboost:: equivalents.
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-07 19:17:16


On 7 Jun 2015 at 14:16, Edward Diener wrote:

> I see these options realistically for Boost library developers:
>
> 1) We can continue to use public interfaces in our libraries that use
> other Boost libraries as the LCD, even if the C++ standard has a pretty
> close equivalent. Programmers compiling in C++11 mode, and inevitably
> there will be more as time goes on, who use the C++ standard library
> equivalents of Boost libraries, and inevitably there will be more using
> these equivalents as time goes on, may well be irritated about this
> situation. But if we view that as their problem and not ours, this is
> the obvious option.
>
> 2) We can design totally separate implementations of the same library,
> one to be used for C++11 and using C++ standard library equivalents in
> public interfaces, the other to be used for C++03 and using the
> equivalent Boost libraries in their public interfaces.
>
> 3) We can support our public interfaces with both the C++ standard
> library equivalent ( in C++11 mode ) and the Boost library equivalent,
> so as to accomodate end-users.
>
> 4) We can use the macro system I have created.
>
> Realistically 2) or 3) is an awful amount of work, which I as a
> developer would not want to do.

5) We can use APIBind to enable Boost library users to easily inject
which dependencies a library uses from the outside, where each
possible configuration of that library gets its own ABI thus ensuring
that impossible or dangerous combinations fail to link and the
compiler will refuse to pass ABI incompatible implementations into
one another.

6) We can use APIBind to enable a Boost library to be C++ 98
compatible as part of Boost or be C++ 11 mandatory and no longer
require any Boost, with an identical source code base for both config
options. Also with ABI safety.

> [snip]
> I hate to re-invent the wheel.

APIBind comes at the C++ 11 problem from the outside coming in. Yours
comes from inside Boost going out. Like your solution, APIBind is
proven working solution which should be better understood by the
community soon at the end of July during the AFIO review, and there
is a C++ Now presentation with 90 minutes on just APIBind, with
plenty of valuable audience commentary by WG21 members and long time
Boost community members.

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