summaryrefslogtreecommitdiff
path: root/datastructures/persistent.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-03-15 01:48:00 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-03-15 01:48:00 +0100
commite9958381801bf44fd0635aaa1e68541b21e193e0 (patch)
treee463b44786fc02e332e4cc205654858f95820105 /datastructures/persistent.cpp
parent7e24d9d392aff890981f13c299b283189d94a75d (diff)
fix persistent and add test
Diffstat (limited to 'datastructures/persistent.cpp')
-rw-r--r--datastructures/persistent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/datastructures/persistent.cpp b/datastructures/persistent.cpp
index 0a65a79..4093cdc 100644
--- a/datastructures/persistent.cpp
+++ b/datastructures/persistent.cpp
@@ -7,7 +7,7 @@ struct persistent {
: time(time), data(1, {time, value}) {}
T get(int t) {
- return prev(upper_bound(all(data), {t+1, {}}))->second;
+ return prev(upper_bound(all(data), pair{t+1, T{}}))->second;
}
int set(T value) {