[libcxx-commits] [PATCH] D60027: Add shift functions (P0769)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 5 11:17:28 PDT 2019
zoecarver marked an inline comment as done.
zoecarver added a comment.
Thoughts on manually (using for loops) decrementing / incrementing iterators vs `std::next`/`std::advance`?
================
Comment at: include/algorithm:5736
+ auto __size = _VSTD::distance(__first, __last);
+ if (__n <= 0 || __size <= 0 || __n >= __size) return __first;
+
----------------
zoecarver wrote:
> Negative ranges are supported too.
Nevermind, that was an earlier revision. Negative values are UB.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60027/new/
https://reviews.llvm.org/D60027
More information about the libcxx-commits
mailing list