[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2021-02-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Everything in this PR is obsolete and/or fixed at this point, //except// for the change to , which as Eric said, fixes the lower-hanging fruit but sadly can't "ADL-proof" it completely. (Grepping for "ADL" in the git history of `libcxx/include/` will turn up a lot

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. dlj and I discussed this offline somewhat, and dlj made the interesting point that using ADL *at all* within the implementation of the standard library brings with it the risk that your implementation will not function correctly if a user-declared operator could be at

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-14 Thread David L. Jones via Phabricator via cfe-commits
dlj added a comment. In https://reviews.llvm.org/D37538#871515, @EricWF wrote: > @dlj I went ahead and committed the fixes to `std::allocator_traits` in > r313324, because I think we agree those are bugs, and I didn't want this > discussion to hold up that fix. I hope you don't mind. Nope,

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @dlj I went ahead and committed the fixes to `std::allocator_traits` in r313324, because I think we agree those are bugs, and I didn't want this discussion to hold up that fix. I hope you don't mind. https://reviews.llvm.org/D37538

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/deque:1167-1168 allocator_type& __a = __alloc(); -for (iterator __i = begin(), __e = end(); __i != __e; ++__i) -__alloc_traits::destroy(__a, _VSTD::addressof(*__i)); +for (iterator __i = begin(), __e = end();

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-13 Thread David L. Jones via Phabricator via cfe-commits
dlj updated this revision to Diff 115165. dlj added a comment. - Remove deque from the test for now. https://reviews.llvm.org/D37538 Files: include/__split_buffer include/memory test/std/containers/containers.general/construct_destruct.pass.cpp Index:

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-13 Thread David L. Jones via Phabricator via cfe-commits
dlj updated this revision to Diff 115164. dlj added a comment. - Remove deque from the test for now. https://reviews.llvm.org/D37538 Files: include/__split_buffer include/deque include/memory test/std/containers/containers.general/construct_destruct.pass.cpp Index:

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-13 Thread David L. Jones via Phabricator via cfe-commits
dlj marked 2 inline comments as done. dlj added inline comments. Comment at: include/deque:1167-1168 allocator_type& __a = __alloc(); -for (iterator __i = begin(), __e = end(); __i != __e; ++__i) -__alloc_traits::destroy(__a, _VSTD::addressof(*__i)); +for

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/memory:1349 is_same< -decltype(__has_construct_test(declval<_Alloc>(), - declval<_Pointer>(), - declval<_Args>()...)), +

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-12 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/memory:1349 is_same< -decltype(__has_construct_test(declval<_Alloc>(), - declval<_Pointer>(), - declval<_Args>()...)), +

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__split_buffer:279 while (__begin_ != __new_begin) -__alloc_traits::destroy(__alloc(), __to_raw_pointer(__begin_++)); +__alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(__begin_++)); }

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good to me, but I'd like EricWF to also review. Comment at: include/deque:1167-1168 allocator_type& __a = __alloc(); -for (iterator __i = begin(), __e = end(); __i != __e; ++__i) -__alloc_traits::destroy(__a,

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-06 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Some container operations require ADL. For example, std::advance is required to use specific operators, which will participate in ADL. However, implementation details which rely on SFINAE should be