diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-05 17:35:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-05 17:35:07 +0000 |
commit | 0fcccd4d45b593bc11e56ff5be36a04836749376 (patch) | |
tree | 392f9a2f5a1c35830227857005d93fd23374068a /include/llvm | |
parent | fcb0a278951d5e6bd878e183f2f1e9b3abf2e200 (diff) | |
download | external_llvm-0fcccd4d45b593bc11e56ff5be36a04836749376.zip external_llvm-0fcccd4d45b593bc11e56ff5be36a04836749376.tar.gz external_llvm-0fcccd4d45b593bc11e56ff5be36a04836749376.tar.bz2 |
allow clients of SmallSet to specify their own comparison function for the set.
Patch by Stepan Dyatkovskiy!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/SmallSet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index d03f1be..cd117f5 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -27,13 +27,13 @@ namespace llvm { /// /// Note that this set does not provide a way to iterate over members in the /// set. -template <typename T, unsigned N> +template <typename T, unsigned N, typename C = std::less<T> > class SmallSet { /// Use a SmallVector to hold the elements here (even though it will never /// reach its 'large' stage) to avoid calling the default ctors of elements /// we will never use. SmallVector<T, N> Vector; - std::set<T> Set; + std::set<T, C> Set; typedef typename SmallVector<T, N>::const_iterator VIterator; typedef typename SmallVector<T, N>::iterator mutable_iterator; public: |