Boost logo

Boost :

Subject: Re: [boost] C++03 / C++11 compatibility question for compiled libraries
From: Peter Dimov (lists_at_[hidden])
Date: 2018-02-08 23:58:16


degski wrote:

> > the class layout and size could change if you compile this in two
> > translation units, one C++14 (uses boost::string_view), one C++17 (uses
> > std::string_view).
>
> Does this apply also when using static libs, each one statically linked to
> its' CRT (at the time of compilation)?

It applies to mostly everything, except perhaps pure implementation details
of DLLs.

And, if we're talking about string_view in particular, it's often used in
interfaces as a function parameter so it'd be pretty much guaranteed to blow
up unless boost::string_view and std::string_view happen to share the same
layout.


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