Repository navigation
Relocate the contained value through the construction dispatch - #117
Merged
Merged
Conversation
mingxwa
requested review from
guominrui,
tian-lt,
tian-lt-personal and
zhihaoy
November 21, 2026 06:14
mingxwa
force-pushed
the
user/mingxwa/reloc
branch
from
November 22, 2026 03:11
1b03c74 to
2cf6180
Compare
mingxwa
force-pushed
the
user/mingxwa/reloc
branch
from
November 22, 2026 03:33
2cf6180 to
52dcca6
Compare
- Generalized the internal copy dispatch to forward its operand and renamed it `construction_dispatch`. Relocation now moves the contained value through the same dispatch as copying, so `relocate_dispatch` is no longer needed. - Narrowed the special case in the generated invocation function to the bitwise copy of a bitwise trivially relocatable type, which must not destroy the source. Other types reach the rvalue branch, which moves the value into the destination and then destroys the source. The immediately invoked lambda is gone. - Renamed `destroy_dispatch` to `destruction_dispatch` to match. - Defined both dispatches before the generated invocation function, so the special case names a complete type without a forward declaration. - Moved `destroying_guard` into the rvalue branch as a local class, because that branch is now its only user.
mingxwa
force-pushed
the
user/mingxwa/reloc
branch
from
November 22, 2026 03:47
52dcca6 to
a2b2cef
Compare
This file contains hidden or 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
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.
construction_dispatch. Relocation now moves the contained value through the same dispatch as copying, sorelocate_dispatchis no longer needed.destroy_dispatchtodestruction_dispatchto match.destroying_guardinto the rvalue branch as a local class, because that branch is now its only user.