
Hi Marshall, 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.
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 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html is the proposal for "a future version of C++" ;-)
I hope it gets included into the standard soon. Best, Matus