Skip to content

Conversation

@gharveymn
Copy link
Owner

@gharveymn gharveymn commented Nov 28, 2024

My attention was brought to this issue by Ilya Gorbatenko (Горбатенко Илья). Thanks Ilya!

An oversight which was made during development was the fact that construction of values should be done using the correct allocator during copy-assign, move-assign, and swap operations. This PR will fix that.

For example, during a move, if we have unequal allocators, and propagate_on_container_move_assignment is true, and if we need to construct elements in the inline buffer, then we need to make sure we construct those elements with the incoming allocator, rather than the existing one. This is a bit less trivial than it would seem because of the need to account for sound exception handling.

These changes still need a bit of cleanup, but should be correct, as verified by the improved rigor of the unit tests.

@gharveymn gharveymn force-pushed the fix-allocator-construction-tracking branch from 0d4696d to 20b47f5 Compare November 30, 2024 21:55
@gharveymn gharveymn force-pushed the fix-allocator-construction-tracking branch from 1b9e32e to e000bdf Compare December 24, 2024 21:08
@gharveymn gharveymn marked this pull request as ready for review February 7, 2025 08:33
@gharveymn gharveymn force-pushed the fix-allocator-construction-tracking branch from 98c15df to 910d577 Compare March 30, 2025 19:03
@gharveymn gharveymn merged commit 780f158 into main Mar 30, 2025
15 checks passed
@gharveymn
Copy link
Owner Author

Thanks again @Nigmatul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants