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 | 22dd774d8fc67b047500ca36ffe010e403ad1967 (patch) | |
| tree | cfd2c5e7277946e709ffb54aeed7f055a4690159 | |
| parent | b7ff9e84bee0c37f9fb79cb5edce1ec2d8ec8b42 (diff) | |
| download | bcm5719-llvm-22dd774d8fc67b047500ca36ffe010e403ad1967.tar.gz bcm5719-llvm-22dd774d8fc67b047500ca36ffe010e403ad1967.zip | |
STLExtras: Add less_ptr.
llvm-svn: 78521
| -rw-r--r-- | llvm/include/llvm/ADT/STLExtras.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index 964e7e07ef7..9ac73c0c96c 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/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; |

