From 72bdba182d24ec8fd93d1d2b9bbe54aa57ff0e5d Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 17 Jul 2023 16:05:04 -0400 Subject: PriorityQueue: generalized priority queue comparison operation Generalized the comparison used for the priority queue to enable its use within the KNN query code. --- include/framework/RecordInterface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/framework') diff --git a/include/framework/RecordInterface.h b/include/framework/RecordInterface.h index a3f6814..8d40590 100644 --- a/include/framework/RecordInterface.h +++ b/include/framework/RecordInterface.h @@ -40,6 +40,17 @@ concept KVPInterface = RecordInterface && requires(R r) { r.value; }; +template +concept WrappedInterface = RecordInterface && requires(R r, R s, bool b) { + {r.header} -> std::convertible_to; + r.rec; + {r.set_delete()}; + {r.is_deleted()} -> std::convertible_to; + {r.set_tombstone(b)}; + {r.is_tombstone()} -> std::convertible_to; + {r < s} -> std::convertible_to; +}; + template struct Wrapped { uint32_t header; -- cgit v1.2.3