Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2021-10-18 23:06:55


On 19/10/2021 03:34, Peter Dimov wrote:
> So yes, having two string views may be bad, but the alternative is having four
> of five.

Those are not the only options.

Another possibility is to define a boost::any_string_view which is *not*
a clone of {std,boost}::string_view but just does conversion duck-typing
boilerplate (i.e. it defines no methods of its own other than
conversions, and the only useful thing you can do with one is to assign
it to a {std,boost,other}::string_view).

Ideally, this is what would appear in Boost.Core.

This is somewhat auto-hostile, but that's not unprecedented (Boost.Units
is also auto-hostile).


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