From f3914902daf173e6bfa33b82092056705b814999 Mon Sep 17 00:00:00 2001 From: Gene Harvey Date: Sat, 30 Nov 2024 17:41:27 -0600 Subject: [PATCH] Fix regression where `select_on_container_copy_construction` was used during copy-assignment --- source/include/gch/small_vector.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/include/gch/small_vector.hpp b/source/include/gch/small_vector.hpp index 2ce1bff..98ce454 100644 --- a/source/include/gch/small_vector.hpp +++ b/source/include/gch/small_vector.hpp @@ -2882,7 +2882,8 @@ namespace gch if (InlineCapacity < other.get_size ()) { - alloc_interface new_alloc (other); + // Avoid using `select_on_container_copy_construction` here. + alloc_interface new_alloc (other.allocator_ref ()); const size_ty new_capacity = other.get_size (); const ptr new_data_ptr = new_alloc.allocate_with_hint (