[libcxx-commits] [PATCH] D60027: Add shift functions (P0769)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 5 09:27:47 PDT 2019
zoecarver marked 2 inline comments as done.
zoecarver added inline comments.
================
Comment at: include/algorithm:5733
+template<class _It>
+_It shift_left(_It __first, _It __last, typename iterator_traits<_It>::difference_type __n)
+{
----------------
This needs to be `constexpr` (same with `right_shift`)
================
Comment at: include/algorithm:5736
+ auto __size = _VSTD::distance(__first, __last);
+ if (__n <= 0 || __size <= 0 || __n >= __size) return __first;
+
----------------
Negative ranges are supported too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60027/new/
https://reviews.llvm.org/D60027
More information about the libcxx-commits
mailing list