|
Boost : |
Subject: Re: [boost] C++03 / C++11 compatibility question for compiled libraries
From: degski (degski_at_[hidden])
Date: 2018-02-09 00:06:53
On 8 February 2018 at 17:58, Peter Dimov via Boost <boost_at_[hidden]>
wrote:
> 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.
Again, this was my point from the start, if a standard lib provides a
(std-)facility, that's the one that should be used, just to avoid that
problem. boost::string_view is just impersonating std::string_view, no
guarantee that they are the same, std::string_view should be used, also
inside boost (if available). On STL-level, this happens as well of course,
between different versions.
Thanks, for the clarification...
degski
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk