
15 Nov
2012
15 Nov
'12
7:39 p.m.
On Thu, Nov 15, 2012 at 8:19 PM, Marshall Clow <mclow.lists@gmail.com> wrote:
I'm about to check in some new functionality into the string_algo library; an implementation of string_ref.
Great!
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.
Wouldn't a ptr pair be better?
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".
I'd go with the latter. I'm missing explicit operator bool() const { return !empty(); } Olaf