Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2012-11-15 15:41:59

Marshall Clow 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.

I did something like this once. I called mine const_string_facade - I
also had a mutable version - and it was a template that took an
iterator pair. This lets you adapt something like a vector<char> into
a string.

BUT, I think my feeling is that this is actually taking us in the wrong
direction: my current coding style tries to avoid the "special"
features of std::string and prefers the things that are common to other
containers, and std::algorithms.

Regards, Phil.

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