[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

Bryce Adelstein Lelbach via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 16:02:03 PDT 2017


wash added inline comments.


================
Comment at: include/numeric:182
+{
+	_Tp __saved = __init;
+	for (; __first != __last; ++__first, (void) ++__result) {
----------------
If `__first == __last`, this initialization is unnecessary; I'd refactor this so that we check for `__first != __last` first.


================
Comment at: include/numeric:208
+{
+	_Tp __saved = __init;
+	for (; __first != __last; ++__first, (void) ++__result) {
----------------
If `__first == __last`, this initialization is unnecessary; I'd refactor this so that we check for `__first != __last` first.


https://reviews.llvm.org/D34038





More information about the cfe-commits mailing list