-
Notifications
You must be signed in to change notification settings - Fork 5
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
gharveymn
wants to merge
22
commits into
main
Choose a base branch
from
fix-allocator-construction-tracking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gharveymn
force-pushed
the
fix-allocator-construction-tracking
branch
from
November 30, 2024 21:55
0d4696d
to
20b47f5
Compare
gharveymn
force-pushed
the
fix-allocator-construction-tracking
branch
from
December 24, 2024 21:08
1b9e32e
to
e000bdf
Compare
Also, tighten up the move-assignment algorithm.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.