This patch introduces best::arrow<T>, a helper for returning anything out of an operator->. The doc comment on the type explains why it exists and what C++ semantics it abuses.
best::vec and best::strbuf now have operator->s that effectively return best::span and best::str, respectively. This allows the removal of a ton of duplicated functions, and means that the owned types can't "lag" behind the unowned types! This also means that e.g. best::box<T[]> does not need to duplicate all of the functions from best::span, like to best::vec used to.
This patch introduces
best::arrow<T>
, a helper for returning anything out of anoperator->
. The doc comment on the type explains why it exists and what C++ semantics it abuses.best::vec
andbest::strbuf
now haveoperator->
s that effectively returnbest::span
andbest::str
, respectively. This allows the removal of a ton of duplicated functions, and means that the owned types can't "lag" behind the unowned types! This also means that e.g.best::box<T[]>
does not need to duplicate all of the functions frombest::span
, like tobest::vec
used to.