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 topKey() { return std::nullopt; }
|
||||||
inline OptKey bottomKey() { return OptKey{Key{}}; }
|
inline OptKey bottomKey() { return OptKey{Key{}}; }
|
||||||
// A view of a static empty string, so empty views always have a valid pointer.
|
// A view of the empty string literal, so empty views always have a valid
|
||||||
inline KeyView emptyKeyView() {
|
// pointer. Unlike a function-local static, this needs no guard variable.
|
||||||
static const Key empty;
|
inline KeyView emptyKeyView() { return KeyView("", 0); }
|
||||||
return KeyView(empty);
|
|
||||||
}
|
|
||||||
inline OptKeyView bottomKeyView() { return OptKeyView{emptyKeyView()}; }
|
inline OptKeyView bottomKeyView() { return OptKeyView{emptyKeyView()}; }
|
||||||
|
|
||||||
inline bool isTop(OptKeyView k) { return !k.has_value(); }
|
inline bool isTop(OptKeyView k) { return !k.has_value(); }
|
||||||
|
|||||||
Reference in new issue
Block a user