Boost logo

Boost :

Subject: Re: [boost] ABI issues with -std
From: Peter Dimov (lists_at_[hidden])
Date: 2018-08-20 00:42:27


Andrey Semashev wrote:

> > In practice, the present situation with Boost.System is that you can
> > link 03 to 11, 11 to 03, 03 and 11 to 14, but not 14 to 03 or 11. This
> > was the best I could do.
>
> Sorry, but I don't think this is acceptable. It prevents C++03 users from
> linking with system Boost.System (provided that the system Boost is
> compiled with default gcc options, which enable C++14).

As I said, linking 03 (user code) to 14 (Boost.System) works. The reverse
does not. As I also said, the reverse occurs when the compiler is g++ 5 or
clang++, where the default is 03.

But in general, there's no practical way to support mixed standards unless
we change something in the way we do things, and I don't know what. If you
compile library A with C++03 and library B with C++11 and both use
shared_ptr, in a program that uses both there will be an ODR violation
because shared_ptr will use std::atomic when present (in B) and will not use
it when not (in A).


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