From 904c332058ef570c2685cc52bd364342c016a840 Mon Sep 17 00:00:00 2001 From: js-nano <62746467+js-nano@users.noreply.github.com> Date: Thu, 6 Mar 2025 08:10:52 +0000 Subject: [PATCH] Fix up usage of `std::move_backward` The destinations should point to the *end* of the destination range https://en.cppreference.com/w/cpp/algorithm/move_backward --- include/boost/process/v2/detail/environment_win.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/process/v2/detail/environment_win.hpp b/include/boost/process/v2/detail/environment_win.hpp index d01aad369..40e62c057 100644 --- a/include/boost/process/v2/detail/environment_win.hpp +++ b/include/boost/process/v2/detail/environment_win.hpp @@ -85,7 +85,7 @@ struct key_char_traits if (s1 < s2) return std::move(s2, s2 + n, s1); else - return std::move_backward(s2, s2 + n, s1); + return std::move_backward(s2, s2 + n, s1 + n); } BOOST_CONSTEXPR static