Skip to content

Commit

Permalink
Merge pull request #15 from gharveymn/fix-select_on_container_copy_co…
Browse files Browse the repository at this point in the history
…nstruction-usage

Fix regression where `select_on_container_copy_construction` was used during copy-assignment
  • Loading branch information
gharveymn authored Nov 30, 2024
2 parents 8d27504 + f391490 commit b9bd703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/include/gch/small_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit b9bd703

Please sign in to comment.