Add comparator useful for natural comparisons on collections with

pointers to objects.

llvm-svn: 13909
This commit is contained in:
Alkis Evlogimenos 2004-05-30 07:45:09 +00:00
parent 18006c7075
commit 4ca4d3e7c9

View File

@ -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: