Boost logo

Boost :

Subject: Re: [boost] string_view versus string_ref
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-07-06 08:05:35

On 07/06/17 10:46, Andrzej Krzemienski via Boost wrote:
> Hi Everyone,
> I would like to understand the situation with these two templates:
> basic_string_view and basic_string_ref.
> The official, advertised library is string_ref:
> At the same time we have string_view:
> But the latter is never mentioned in the documentation, except in Boost.Log:
> (see
> The support for boost::basic_string_ref and its specializations is
>> deprecated; users are encouraged to switch to boost::basic_string_view.
>> The support for boost::basic_string_ref will be removed in future
>> releases.
> My question: is there any official position of Boost about having these two
> templates?

My understanding is that string_ref is a legacy implementation and is
deprecated. It should be removed at some point. Users should use
string_view. The docs seem to need an update though.

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