util/AllocatedString: support casting a nulled instance to string_view
This commit is contained in:
parent
5e67443a1a
commit
36168a24f5
@ -125,7 +125,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
operator string_view() const noexcept {
|
operator string_view() const noexcept {
|
||||||
return value;
|
return value != nullptr
|
||||||
|
? string_view(value)
|
||||||
|
: string_view();
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr const_pointer c_str() const noexcept {
|
constexpr const_pointer c_str() const noexcept {
|
||||||
|
Loading…
Reference in New Issue
Block a user