1
0
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:
Nick Lewycky 2008-07-12 07:00:52 +00:00
parent 3fb5816774
commit 0dae6f90bb

View File

@ -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) {}