You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ADT] Teach StringRef to derive from std::string_view (#113752)
This patch makes minimum changes to have StringRef derive from
std::string_view, with an eventual goal of removing StringRef
completely. Subsequent patches will further clean up the remaining
bits.
I've chosen public inheritance over private one because our codebase
relies on implicit conversions to std::string_view, which is currently
provided by:
constexpr operator std::string_view() const {
return std::string_view(data(), size());
}
This implicit conversion stops applying once we use std::string_view
as a base class, public or private. If we chose a private base class,
we would lose the implicit conversion.
0 commit comments