Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Jamie Allsop (ja11sop_at_[hidden])
Date: 2012-11-16 06:39:47


On 15/11/12 19:19, Marshall Clow wrote:
> I'm about to check in some new functionality into the string_algo library; an implementation of string_ref.

Isn't this really a separate library? If you want to use it as part of
the string_algo library make it a 'detail'. Don't get me wrong I think
something like this is good. I'm just saying if it can be made a detail
in string_algo do that and then separately move for standalone status in
boost, and if not then it is really just a separate library and should
be treated as such.

>
> 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.
>
> 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 think it should be under 'strings' or 'utility'.

>
> 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 assume you are following the N3442 interface? (I didn't check).

>
> Please let me know what you think!

If this is really a separate library (I think it is) then shouldn't it
be reviewed and then string_algo updated to work with it? This would
have the additional benefit of providing feedback in general for N3442.

Jamie


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk