Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Matus Chochlik (chochlik_at_[hidden])
Date: 2012-11-15 14:31:18

Hi Marshall,

On Thu, Nov 15, 2012 at 8:19 PM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> I'm about to check in some new functionality into the string_algo library; an implementation of string_ref.
> A string_ref is a non-owning reference to a string. It is implemented as a {pointer, length} pair, and is exceedingly useful
> when parsing, and manipulating strings in "read-only" ways.

Nice and thanks for your work! Personally I've been missing something
like this in the standard many times and had to write some such class
for several different projects.

> The header will be in boost/algorithm/string_ref.hpp, but I welcome discussion about where it should live.
> Ideally, I think it should be just "boost/string_ref.hpp".

+1 to boost/string_ref.hpp (it is not an algorithm)

> Basic sanity tests will be checked in with the header file - I have tested on clang, clang11, and gcc.
> One reason for checking this in now is to get the tests run on lots of different systems.
> Docs will be coming soon, but
> is the proposal for "a future version of C++" ;-)

I hope it gets included into the standard soon.



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