[PATCH] D26991: Remove unused code

Aditya Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 09:36:15 PST 2016


hiraditya added inline comments.


================
Comment at: libcxx/include/algorithm:1499
+    // Load the first element from __first2 outside the loop because it is loop invariant
+    typename iterator_traits<_RandomAccessIterator1>::value_type __firstElement2 = *__first2;
+
----------------
hiraditya wrote:
> mclow.lists wrote:
> > I just realized that we can't do this.
> > This imposes a requirement that the `value_type` be copy-constructible.
> > 
> > With this in place, we can't search a sequence of move-only types.
> Ok, I'll remove this change while pushing. I'll change the subject as well, because now this patch is just removing the unused code.
> Thanks for the review.
Are we allowed to call __search on a type which is not copy-constructible?


Repository:
  rL LLVM

https://reviews.llvm.org/D26991





More information about the cfe-commits mailing list