[PATCH] D28371: Add missing operators for iterator_facade_base

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 13:08:42 PST 2017


inglorion added inline comments.


================
Comment at: llvm/include/llvm/ADT/iterator.h:93
+        "The '-' operator is only defined for random access iterators.");
+    return i - *static_cast<const DerivedT *>(this);
+  }
----------------
Do we have a test that exercises this code path? It seems to me that this would compute the negative of the value you want, but it could be that I'm misunderstanding something.


https://reviews.llvm.org/D28371





More information about the llvm-commits mailing list