Boost logo

Boost :

Subject: Re: [boost] Constructing string_ref from rvalue string
From: Daniel James (dnljms_at_[hidden])
Date: 2017-03-24 09:44:40

On 24 March 2017 at 07:57, Jonathan Müller via Boost
<boost_at_[hidden]> wrote:
> That's exactly what I said in my blog post. Function parameters are a
> special use case that require a different type, that type is
> std::string_view, for everything else a boost::string_ref that doesn't bind
> to rvalues could be repurposed.

That sounds like a pernickety solution to me. I'd find it easier to
remember the risks than have to remember which type to use at any
particular moment.

Regardless, my main concern would be that string_view isn't compatible
with the standard. Generally when I see a Boost version of a standard
library object I expect it be reasonably close to a drop in

Boost list run by bdawes at, gregod at, cpdaniel at, john at