Add global methods that prevent us from using ilist::iterators as

random access iterators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos 2004-02-09 22:40:50 +00:00
parent ccb2a677af
commit 71be6db3ef
2 changed files with 24 additions and 0 deletions

View File

@ -156,6 +156,18 @@ public:
pointer getNodePtrUnchecked() const { return NodePtr; }
};
// do not implement. this is to catch errors when people try to use
// them as random access iterators
template<typename T>
void operator-(int, ilist_iterator<T>);
template<typename T>
void operator-(ilist_iterator<T>,int);
template<typename T>
void operator+(int, ilist_iterator<T>);
template<typename T>
void operator+(ilist_iterator<T>,int);
//===----------------------------------------------------------------------===//
// ilist_compat_iterator<Node> - Compatibility iterator for intrusive list.
// This makes an ilist<X> act like an std::list<X*>, where you have to

View File

@ -156,6 +156,18 @@ public:
pointer getNodePtrUnchecked() const { return NodePtr; }
};
// do not implement. this is to catch errors when people try to use
// them as random access iterators
template<typename T>
void operator-(int, ilist_iterator<T>);
template<typename T>
void operator-(ilist_iterator<T>,int);
template<typename T>
void operator+(int, ilist_iterator<T>);
template<typename T>
void operator+(ilist_iterator<T>,int);
//===----------------------------------------------------------------------===//
// ilist_compat_iterator<Node> - Compatibility iterator for intrusive list.
// This makes an ilist<X> act like an std::list<X*>, where you have to