projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8246bef
)
STLExtras: Add less_ptr.
author
Daniel Dunbar
<daniel@zuster.org>
Sun, 9 Aug 2009 03:36:59 +0000
(
03:36
+0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Sun, 9 Aug 2009 03:36:59 +0000
(
03:36
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/STLExtras.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/STLExtras.h
b/include/llvm/ADT/STLExtras.h
index 964e7e07ef7d57a67ef37ef61cb4599c44bc5063..9ac73c0c96c5d51e49a121910b9e22c9bbcd4006 100644
(file)
--- a/
include/llvm/ADT/STLExtras.h
+++ b/
include/llvm/ADT/STLExtras.h
@@
-28,6
+28,13
@@
namespace llvm {
// Extra additions to <functional>
//===----------------------------------------------------------------------===//
+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 {