From: Dan Gohman Date: Fri, 30 May 2008 22:37:47 +0000 (+0000) Subject: Add an operator< for SmallVector. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=11bf2ace556da018c65163557fb97704b1cf88e4;p=oota-llvm.git Add an operator< for SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51791 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 843d561b6bc..715f28c2796 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -307,6 +307,11 @@ public: return true; } bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); } + + bool operator<(const SmallVectorImpl &RHS) const { + return std::lexicographical_compare(begin(), end(), + RHS.begin(), RHS.end()); + } private: /// isSmall - Return true if this is a smallvector which has not had dynamic