From c4b3407512808e161624e209c246e7e4877fe1fe Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 30 Oct 2021 17:35:35 +0200 Subject: [PATCH] :green_heart: update amalgamation --- single_include/nlohmann/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3c7f24df6..6a155f9f4 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -17519,7 +17519,7 @@ template , // ^ ^ // it it + elements_affected - for (auto it = first; it != this->end(); ++it) + for (auto it = first; std::next(it, elements_affected) != this->end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it