summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/STLExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/llvm/ADT/STLExtras.h
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadllvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.xz
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/STLExtras.h')
-rw-r--r--include/llvm/ADT/STLExtras.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index 44d789dcf2..0168bf2624 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -36,7 +36,7 @@
// arguments to get a boolean result.
//
template<class Ty>
-struct bitwise_or : public binary_function<Ty, Ty, bool> {
+struct bitwise_or : public std::binary_function<Ty, Ty, bool> {
bool operator()(const Ty& left, const Ty& right) const {
return left | right;
}
@@ -70,9 +70,9 @@ class mapped_iterator {
RootIt current;
UnaryFunc Fn;
public:
- typedef typename iterator_traits<RootIt>::iterator_category
+ typedef typename std::iterator_traits<RootIt>::iterator_category
iterator_category;
- typedef typename iterator_traits<RootIt>::difference_type
+ typedef typename std::iterator_traits<RootIt>::difference_type
difference_type;
typedef typename UnaryFunc::result_type value_type;
typedef typename UnaryFunc::result_type *pointer;
@@ -102,6 +102,7 @@ public:
_Self& operator-= (difference_type n) { current -= n; return *this; }
reference operator[](difference_type n) const { return *(*this + n); }
+ inline bool operator!=(const _Self &X) const { return !operator==(X); }
inline bool operator==(const _Self &X) const { return current == X.current; }
inline bool operator< (const _Self &X) const { return current < X.current; }