[llvm-commits] CVS: llvm/include/Support/ilist

Alkis Evlogimenos alkis at cs.uiuc.edu
Mon Feb 9 16:42:02 PST 2004


Changes in directory llvm/include/Support:

ilist updated: 1.17 -> 1.18

---
Log message:

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


---
Diffs of the changes:  (+12 -0)

Index: llvm/include/Support/ilist
diff -u llvm/include/Support/ilist:1.17 llvm/include/Support/ilist:1.18
--- llvm/include/Support/ilist:1.17	Sat Feb  7 18:51:31 2004
+++ llvm/include/Support/ilist	Mon Feb  9 16:40:50 2004
@@ -156,6 +156,18 @@
   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





More information about the llvm-commits mailing list