diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-21 08:38:06 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-21 08:38:06 +0000 |
commit | 29d020ab606cebb7ea17678e6a4a8b8d82d00c60 (patch) | |
tree | 2ac97c5cfb8c60519c09f1ffaf14fb7078aceb97 | |
parent | fbc436bbce828732dbce7ae8763914b7aa193d2b (diff) | |
download | bcm5719-llvm-29d020ab606cebb7ea17678e6a4a8b8d82d00c60.tar.gz bcm5719-llvm-29d020ab606cebb7ea17678e6a4a8b8d82d00c60.zip |
Add greater_ptr functor.
llvm-svn: 15070
-rw-r--r-- | llvm/include/Support/STLExtras.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/Support/STLExtras.h b/llvm/include/Support/STLExtras.h index 961407f5040..b6379d26232 100644 --- a/llvm/include/Support/STLExtras.h +++ b/llvm/include/Support/STLExtras.h @@ -60,6 +60,13 @@ struct less_ptr : public std::binary_function<Ty, Ty, bool> { } }; +template<class Ty> +struct greater_ptr : public std::binary_function<Ty, Ty, bool> { + bool operator()(const Ty* left, const Ty* right) const { + return *right < *left; + } +}; + // deleter - Very very very simple method that is used to invoke operator // delete on something. It is used like this: // |