-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emphasize move semantics isn't needed for cross-kind raw_ptr conversion
This CL doesn't change the code, just adds comments and tests. Cross-kind move will degrade to cross-kind copy, which is what we want, as different traits may use different ref-count, which a move operation wouldn't update. There is a worry that an operation would silently kick off a chain of implicit conversions: raw_ptr<T, X> -> T* -> raw_ptr<T, Y>, but the tests confirm that this doesn't happen with a move. Bug: 1407995 Change-Id: I6adcbe3c699d768283626dcd7ad4dfb26cc54d3e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4263931 Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Reviewed-by: Sergei Glazunov <glazunov@google.com> Cr-Commit-Position: refs/heads/main@{#1107673}
- Loading branch information
1 parent
d3901ef
commit 6331eec
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
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
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
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