mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-03 10:19:25 +00:00
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
This commit is contained in:
parent
3ac9e109b2
commit
066075030a
@ -93,6 +93,10 @@ public:
|
||||
typedef typename super::reference reference;
|
||||
private:
|
||||
pointer NodePtr;
|
||||
|
||||
// operator[] is not defined. Compile error instead of having a runtime bug.
|
||||
void operator[](unsigned) {}
|
||||
void operator[](unsigned) const {}
|
||||
public:
|
||||
|
||||
ilist_iterator(pointer NP) : NodePtr(NP) {}
|
||||
|
Loading…
Reference in New Issue
Block a user