diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-09 03:36:59 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-09 03:36:59 +0000 |
commit | 40a6001f02ba139e2d73892cfd7a3c786c1805cc (patch) | |
tree | bef3b60ee24b6645225bd47271265220f4f925e5 /include/llvm/ADT | |
parent | 414483833c0365346f5e46a6e658502c2e84ec06 (diff) | |
download | external_llvm-40a6001f02ba139e2d73892cfd7a3c786c1805cc.zip external_llvm-40a6001f02ba139e2d73892cfd7a3c786c1805cc.tar.gz external_llvm-40a6001f02ba139e2d73892cfd7a3c786c1805cc.tar.bz2 |
STLExtras: Add less_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/STLExtras.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 964e7e0..9ac73c0 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -29,6 +29,13 @@ namespace llvm { //===----------------------------------------------------------------------===// template<class Ty> +struct less_ptr : public std::binary_function<Ty, Ty, bool> { + bool operator()(const Ty* left, const Ty* right) const { + return *left < *right; + } +}; + +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; |