[PATCH] D38433: Introduce a specialized data structure to be used in a subsequent change
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 16:27:44 PDT 2017
dblaikie added a comment.
Looks a fair bit like std::deque - what're the tradeoffs between the two?
================
Comment at: include/llvm/ADT/ChunkedList.h:100-102
+ bool operator==(const ConstIterator &RHS) const {
+ assert(Current != RHS.First || First == RHS.First && "Broken invariant");
+ return Current == RHS.Current;
----------------
Anything operator overload that can be a non-member generally should be, so conversions on LHS and RHS have matching handling. (can still be a friend which allows inline definition here, if that's desired/convenient)
https://reviews.llvm.org/D38433
More information about the llvm-commits
mailing list