From 84d9a2910739cabaded6d7f74a795ae8ab04b83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 2 Jan 2026 13:39:16 +0100 Subject: [PATCH] Implement the same logic as deque, resetting the back index to the first index instead of putting both at offset zero. --- include/boost/container/devector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/container/devector.hpp b/include/boost/container/devector.hpp index ecce4b9..cf6d7e1 100644 --- a/include/boost/container/devector.hpp +++ b/include/boost/container/devector.hpp @@ -2156,7 +2156,7 @@ class devector void clear() BOOST_NOEXCEPT { destroy_elements(begin(), end()); - m_.front_idx = m_.back_idx = 0; + m_.back_idx = m_.front_idx; } BOOST_CONTAINER_NODISCARD inline