From fbea78afcad1316c94e69f606e6df7cf629f4ad3 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 30 Oct 2021 19:23:54 +0200 Subject: [PATCH] :alembic: fix MSVC issue --- include/nlohmann/ordered_map.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/ordered_map.hpp b/include/nlohmann/ordered_map.hpp index 1f009643f..1c161efdd 100644 --- a/include/nlohmann/ordered_map.hpp +++ b/include/nlohmann/ordered_map.hpp @@ -132,7 +132,7 @@ template , // ^ ^ // it it + elements_affected - for (auto it = first; std::next(it, elements_affected) != this->end(); ++it) + for (auto it = first; std::next(it, elements_affected) != Container::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 diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index a3c42bf5d..3743fb8e0 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; std::next(it, elements_affected) != this->end(); ++it) + for (auto it = first; std::next(it, elements_affected) != Container::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