This commit is contained in:
1 parent
bf149c26b5
commit
b665b2dc6f
1 file changed
+3
-5
+3
-5
@@ -169,11 +169,9 @@ inline OptKey optMax(const std::optional<A>& a, const std::optional<B>& b) {
|
||||
|
||||
inline OptKey topKey() { return std::nullopt; }
|
||||
inline OptKey bottomKey() { return OptKey{Key{}}; }
|
||||
// A view of a static empty string, so empty views always have a valid pointer.
|
||||
inline KeyView emptyKeyView() {
|
||||
static const Key empty;
|
||||
return KeyView(empty);
|
||||
}
|
||||
// A view of the empty string literal, so empty views always have a valid
|
||||
// pointer. Unlike a function-local static, this needs no guard variable.
|
||||
inline KeyView emptyKeyView() { return KeyView("", 0); }
|
||||
inline OptKeyView bottomKeyView() { return OptKeyView{emptyKeyView()}; }
|
||||
|
||||
inline bool isTop(OptKeyView k) { return !k.has_value(); }
|
||||
|
||||
Reference in new issue
Block a user