<memory>
etc.: ADL should be avoided when calling _Construct_in_place
and its friends
#3100
Labels
bug
Something isn't working
This well-formed program fails to compile with MSVC STL due to unqualified calls to internal functions (which trigger ADL and overly require completeness of related types).
Godbolt link. (libc++ accepts it correctly)
This is similar to #1596 but touches different library mechanisms, and should be considered as a sub-issue of #140.
Previously, 3 libc++ tests were blocked by this issue:
std/utilities/function.objects/func.wrap/func.wrap.func/robust_against_adl.pass.cpp
std/utilities/memory/allocator.traits/allocator.traits.members/construct.pass.cpp
std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp
Perhaps we should
_STD
-qualify internal function calls used for in-place construction/destruction by default, especially for_Construct_in_place
,_Destroy_in_place
,and(_Voidify_iter
_Voidify_iter
was killed when implementing LWG-3870).variant
are fixed by_STD
-qualify_Ugly
non-member function calls in<variant>
#3148.any
are fixed by Bugfixes for<any>
#3965.allocator
are fixed by Properly destroyvector<shared_ptr<uninstantiable>>
#4373.shared_ptr
are fixed by<memory>
: ADL-proof implementation ofshared_ptr
creation functions and atomic smart pointers #4403.function
, etc. are fixed by ADL-proof implementation offunction
,move_only_function
,packaged_task
,promise
, andoptional
#4430.The text was updated successfully, but these errors were encountered: