diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-17 16:05:04 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-07-17 16:05:04 -0400 |
| commit | 72bdba182d24ec8fd93d1d2b9bbe54aa57ff0e5d (patch) | |
| tree | cdba8aa3a563fa2ddd0e52201c5f9319456d6125 /include/framework | |
| parent | 99d957ea185c3641e407b73a757bc9e2b5673686 (diff) | |
| download | dynamic-extension-72bdba182d24ec8fd93d1d2b9bbe54aa57ff0e5d.tar.gz | |
PriorityQueue: generalized priority queue comparison operation
Generalized the comparison used for the priority queue to enable its use
within the KNN query code.
Diffstat (limited to 'include/framework')
| -rw-r--r-- | include/framework/RecordInterface.h | 11 |
1 files changed, 11 insertions, 0 deletions
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<R> && requires(R r) { r.value; }; +template<typename R> +concept WrappedInterface = RecordInterface<R> && requires(R r, R s, bool b) { + {r.header} -> std::convertible_to<uint32_t>; + r.rec; + {r.set_delete()}; + {r.is_deleted()} -> std::convertible_to<bool>; + {r.set_tombstone(b)}; + {r.is_tombstone()} -> std::convertible_to<bool>; + {r < s} -> std::convertible_to<bool>; +}; + template<RecordInterface R> struct Wrapped { uint32_t header; |