mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add comparator useful for natural comparisons on collections with
pointers to objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f561b08d67
commit
1da7e8e0b3
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user