Add an operator< for SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-05-30 22:37:47 +00:00
parent dbb8137c11
commit 11bf2ace55

View File

@ -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