<memory>: ADL-proof implementation of shared_ptr creation functions and atomic smart pointers#4403
Merged
StephanTLavavej merged 3 commits intomicrosoft:mainfrom Feb 27, 2024
Conversation
- `_Fill_memset` calls are qualified for consistency. - One `_Deallocate` call is qualified like a previous PR. - `_Make_shared_unbounded_array` and `_Allocate_shared_unbounded_array` overloads are consistently `_STD`-qualified, even though some don't need.
StephanTLavavej
approved these changes
Feb 20, 2024
Member
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Member
|
Thanks for sharing these improvements! 😹 🎉 🥳 |
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.
Towards #140 and #3100.
Notes:
_Fill_memsetis_STD-qualified for consistency, although it seems that_Fill_memsetis never used with "weird" types._Make_shared_unbounded_arrayand_Allocate_shared_unbounded_arrayoverloads are consistently_STD-qualified even though some don't need._Deallocatecall is_STD-qualified as drive-by since Properly destroyvector<shared_ptr<uninstantiable>>#4373 started to do this._Deallocatecall are all related tofunctionand will be handled in a future PR._STD addressof(meow)is used in some places instead of&. This seems necessary even if no ADL-incompatible type is involved, because an overloaded unaryoperator&can still do evil.adl_proof_allocatoris invented. Because the equality comparison ofstd::allocator<holder<incomplete>*>is ill-formed, which makes it not actually meet the Cpp17Allocator requirements.