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