mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
operator[] is not defined for list::iterator. Overload it in ilist::iterator
to prevent silly things from happening accidentally. PR2171 llvm-svn: 53507
This commit is contained in:
parent
3fb5816774
commit
0dae6f90bb
@ -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