From bec5099d56bb66c91f520bd9d2dbe568474a3dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 28 Jul 2026 13:07:39 +0200 Subject: [PATCH] Scope segduo return type, in some compilers, this saves a bit of stack. --- .../container/experimental/segmented_partition.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/boost/container/experimental/segmented_partition.hpp b/include/boost/container/experimental/segmented_partition.hpp index 472ae7f..04f9470 100644 --- a/include/boost/container/experimental/segmented_partition.hpp +++ b/include/boost/container/experimental/segmented_partition.hpp @@ -207,11 +207,12 @@ SegIt segmented_partition_dispatch(SegIt first, SegIt last, Pred pred, segmented while (sf != sl) { const local_iterator f_end = traits::end(sf); const local_iterator l_beg = traits::begin(sl); - - const segduo r = - partition_disjoint_bidir_ranges(f_loc, f_end, l_beg, l_loc, pred, is_local_seg_t(), local_cat_t()); - f_loc = r.first; - l_loc = r.second; + { + const segduo r = + partition_disjoint_bidir_ranges(f_loc, f_end, l_beg, l_loc, pred, is_local_seg_t(), local_cat_t()); + f_loc = r.first; + l_loc = r.second; + } if (f_loc == f_end) { ++sf;