aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Support/STLExtras.h6
-rw-r--r--include/llvm/ADT/STLExtras.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/include/Support/STLExtras.h b/include/Support/STLExtras.h
index 233b743..961407f 100644
--- a/include/Support/STLExtras.h
+++ b/include/Support/STLExtras.h
@@ -53,6 +53,12 @@ struct bitwise_or : public std::binary_function<Ty, Ty, bool> {
}
};
+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;
+ }
+};
// deleter - Very very very simple method that is used to invoke operator
// delete on something. It is used like this:
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index 233b743..961407f 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -53,6 +53,12 @@ struct bitwise_or : public std::binary_function<Ty, Ty, bool> {
}
};
+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;
+ }
+};
// deleter - Very very very simple method that is used to invoke operator
// delete on something. It is used like this: