diff options
-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: // |