Boost logo

Boost Users :

Subject: Re: [Boost-users] mixing c++98 with c++11
From: Jens Weller (JensWeller_at_[hidden])
Date: 2013-12-06 18:40:27


> Gesendet: Freitag, 06. Dezember 2013 um 23:53 Uhr
> Von: "Chris Stankevitz" <chrisstankevitz_at_[hidden]>
> An: "boost-users_at_[hidden]" <Boost-users_at_[hidden]>
> Betreff: [Boost-users] mixing c++98 with c++11
>
> Hello,
>
> Please consider the following:
>
> application A depends on boost compiled libraries
> application A depends on library B
> library B depends on boost compiled libraries
>
> Q1: Will I have a problem if:
> application A is compiled with gcc c++11
> library B is compiled with gcc c++98
> boost compiled with gcc c++98
>
> Q2: Will I have a problem if:
> application A is compiled with gcc c++11
> library B is compiled with gcc c++11
> boost compiled with gcc c++98
>
> My concern is that boost produces different code in its headers based
> on whether or not the compiler supports c++11.
>
> Thank you,
>
> Chris
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

Hi,

not sure if I can help you here.
I once had the problem, that *my* library B depended on Boost 1.3x, and well, no way to change that.
So, I had to cope with 2 different versions of boost. Still, same compiler and ABI.

GCC might is able to let you interface between the ABIs, but maybe you'll need a library C that acts as a proxy to C++98 from '11(14,1y...).

To your concerns of boost being different for '98 and everything after: yes. I wouldn't let the versions mix.
So you'll need to contain the versions, in this case the lib b to a set of cpp files and private headers, not shared with A.
Any other case, you're basicly asking for trouble (but, might still work).

kind regards,

Jens


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net