Boost logo

Boost :

From: Jeff Garland (azswdude_at_[hidden])
Date: 2020-11-29 16:47:38


On Sun, Nov 29, 2020 at 9:20 AM Peter Dimov via Boost <boost_at_[hidden]>
wrote:

> Jeff Garland wrote:
>
> > I can give you a very concrete one -- from_iso_string in date_time.
> It's
> > signature takes a const std::string&. If I have an std::string_view,
> then
> > I have to unnecessarily construct a string to call this function --
> which
> > harms performance and is ugly.
>
> The answer here is to take a string_view that is constructible from all
> StringLike types, including std::string_view and boost::string_view.
>

Sure, but that type is going to need to account for c++17 versus earlier
versions. And to be clear -- I was just illustrating an example that I
don't consider to be a 'nice to have' for a newer version of c++. There
are certainly others....

> boost::string_view could have been this type, but Marshall refuses to add
> conversions to it, so everybody needs to roll his own. Or perhaps we need
> to
> add one to Core so Marshall's one can be kept pristine and in its original
> shrink wrap.

idk that seems like an even bigger mess...


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