[libcxx-commits] [PATCH] D67273: [libc++] Remove unnecessary assignment in exclusive_scan

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 24 09:34:35 PST 2020


ldionne added inline comments.


================
Comment at: libcxx/include/numeric:314
         {
-            __init = __b(__init, *__first);
-            *__result = __saved;
-            __saved = __init;
+            *__result = _VSTD::move(__init);
             ++__result;
----------------
@BillyONeal  This is equivalent to `*_UDest = _Val;` in your version, and I think you could instead use `*_UDest = STD move(_Val);`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67273



More information about the libcxx-commits mailing list