<memory>: ADL-proof implementation of shared_ptr creation functions and atomic smart pointers
#4403
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.