Boost logo

Boost :

Subject: [boost] [string_ref] degree of conformance to standard proposal
From: Peter A. Bigot (pab_at_[hidden])
Date: 2013-12-22 09:21:49


(Background: I need a string_view with features in N3762 that aren't in
N3442 (viz., pos parameters to the string methods). I'm trying to
determine how much effort I should put into a set of patches to update
the Boost implementation to the latest draft proposal.)

The default constructor for Boost.string_ref produces an object which
returns a null pointer from data(). N3442 and its successor N3762 both
require the return value from data() to be non-null
(http://isocpp.org/files/papers/N3762.html#h5o-5).

GCC's libstdc++ folks solved this by adding a constexpr unit length
string to serve as the base referenced object
(http://gcc.gnu.org/ml/libstdc++/2013-11/msg00104.html). But for Boost
I don't see how this can be changed without introducing a link
dependency.

In a cases like this, how closely does Boost want to track the standard
proposals?

Similarly, the standard proposal has settled on *string_view instead of
*string_ref. Would Boost rename the library/class, or just introduce an
alias?

Peter


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