[libcxx-commits] [PATCH] D92776: [libc++] ADL-proof <algorithm> by adding _VSTD:: qualification on calls.

Reid Kleckner via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 13 13:49:24 PST 2021


rnk added inline comments.


================
Comment at: libcxx/include/algorithm:1739
         return _VSTD::__copy(
-            __unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result));
+            _VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _VSTD::__unwrap_iter(__result));
     }
----------------
This broke Chrome, apparently we were using this ADL extension point to enable memmove optimization for some fancy iterators:
https://source.chromium.org/chromium/chromium/src/+/master:base/containers/checked_iterators.h;l=88?q=__unwrap_iter&ss=chromium

This std::copy optimization was added in April, maybe it's not that important:
https://chromium-review.googlesource.com/c/chromium/src/+/1875734

Can you suggest an alternative solution to make std::copy use memmove for some custom iterator?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92776/new/

https://reviews.llvm.org/D92776



More information about the libcxx-commits mailing list