Skip to content

Commit 1b9e32e

Browse files
committed
Don't use select_on_container_copy_construction during copy-assignment
1 parent 9409f4a commit 1b9e32e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/include/gch/small_vector.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,8 @@ namespace gch
28682868
if (other.allocator_ref () == allocator_ref ())
28692869
return copy_assign_default (other);
28702870

2871-
alloc_interface new_alloc (other);
2871+
// Avoid using `select_on_container_copy_construction` here.
2872+
alloc_interface new_alloc (other.allocator_ref ());
28722873
if (InlineCapacity < other.get_size ())
28732874
{
28742875
const size_ty new_capacity = other.get_size ();
@@ -2924,7 +2925,7 @@ namespace gch
29242925
set_size (other.get_size ());
29252926
}
29262927

2927-
alloc_interface::operator= (std::move(new_alloc));
2928+
alloc_interface::operator= (std::move (new_alloc));
29282929
return *this;
29292930
}
29302931

0 commit comments

Comments
 (0)