From 253e46ea00e263bcf3ad986f7b42511e9fe6ed15 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Mon, 5 Aug 2024 10:39:56 -0400 Subject: [PATCH] Check that insertion was in last position --- debugging/vov-bug-finder/kp_view_of_views_bug_finder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debugging/vov-bug-finder/kp_view_of_views_bug_finder.cpp b/debugging/vov-bug-finder/kp_view_of_views_bug_finder.cpp index 48d2eaae4..9f4cec2d5 100644 --- a/debugging/vov-bug-finder/kp_view_of_views_bug_finder.cpp +++ b/debugging/vov-bug-finder/kp_view_of_views_bug_finder.cpp @@ -37,7 +37,8 @@ class { public: std::mutex mutex; uint64_t push(std::string s) { - map_.emplace_hint(map_.end(), count_, std::move(s)); + auto it = map_.emplace_hint(map_.end(), count_, std::move(s)); + assert(++it == map_.end()); return count_++; } void pop(uint64_t x) {