Add greater_ptr functor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2004-07-21 08:38:06 +00:00
parent 3b1af0b3fc
commit 7b32639362
2 changed files with 14 additions and 0 deletions

View File

@ -60,6 +60,13 @@ struct less_ptr : public std::binary_function<Ty, Ty, bool> {
}
};
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;
}
};
// deleter - Very very very simple method that is used to invoke operator
// delete on something. It is used like this:
//

View File

@ -60,6 +60,13 @@ struct less_ptr : public std::binary_function<Ty, Ty, bool> {
}
};
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;
}
};
// deleter - Very very very simple method that is used to invoke operator
// delete on something. It is used like this:
//