Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix allocator construction tracking #13

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

gharveymn
Copy link
Owner

My attention was brought to this issue by Ilya Gorbatenko (Горбатенко Илья) gorbatenko040805@gmail.com. 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
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.

1 participant