Add an operator< for SmallVector.

llvm-svn: 51791
This commit is contained in:
Dan Gohman 2008-05-30 22:37:47 +00:00
parent c5e21e4f38
commit 52227dbfdb
1 changed files with 5 additions and 0 deletions

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