[llvm-commits] CVS: llvm/include/llvm/ADT/STLExtras.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 22 15:36:52 PST 2005
Changes in directory llvm/include/llvm/ADT:
STLExtras.h updated: 1.19 -> 1.20
---
Log message:
remove some more dead templates and a dead macro.
---
Diffs of the changes: (+0 -33)
STLExtras.h | 33 ---------------------------------
1 files changed, 33 deletions(-)
Index: llvm/include/llvm/ADT/STLExtras.h
diff -u llvm/include/llvm/ADT/STLExtras.h:1.19 llvm/include/llvm/ADT/STLExtras.h:1.20
--- llvm/include/llvm/ADT/STLExtras.h:1.19 Tue Feb 22 17:19:42 2005
+++ llvm/include/llvm/ADT/STLExtras.h Tue Feb 22 17:36:37 2005
@@ -27,39 +27,6 @@
// Extra additions to <functional>
//===----------------------------------------------------------------------===//
-// bind_obj - Often times you want to apply the member function of an object
-// as a unary functor. This macro is shorthand that makes it happen less
-// verbosely.
-//
-// Example:
-// struct Summer { void accumulate(int x); }
-// vector<int> Numbers;
-// Summer MyS;
-// for_each(Numbers.begin(), Numbers.end(),
-// bind_obj(&MyS, &Summer::accumulate));
-//
-// TODO: When I get lots of extra time, convert this from an evil macro
-//
-#define bind_obj(OBJ, METHOD) std::bind1st(std::mem_fun(METHOD), OBJ)
-
-
-// bitwise_or - This is a simple functor that applys operator| on its two
-// arguments to get a boolean result.
-//
-template<class Ty>
-struct bitwise_or : public std::binary_function<Ty, Ty, bool> {
- bool operator()(const Ty& left, const Ty& right) const {
- return left | right;
- }
-};
-
-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 {
More information about the llvm-commits
mailing list