llvm.org GIT mirror llvm / 0660750
operator[] is not defined for list::iterator. Overload it in ilist::iterator to prevent silly things from happening accidentally. PR2171 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53507 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 11 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9292 typedef typename super::reference reference;
9393 private:
9494 pointer NodePtr;
95
96 // operator[] is not defined. Compile error instead of having a runtime bug.
97 void operator[](unsigned) {}
98 void operator[](unsigned) const {}
9599 public:
96100
97101 ilist_iterator(pointer NP) : NodePtr(NP) {}