Hi everyone,
I am currently implementing an iterator for an internal data structure and had a look at how QVector implements its iterator. I don't understand why the QTypedArrayData::iterator implements its ++ and -- operators like:
Qt Code:
T *i; inline iterator &operator++() { ++i; return *this; } inline iterator &operator--() { i--; return *this; }To copy to clipboard, switch view to plain text mode
What I don't understand is the discrepancy between the two: Why does it use a postfix decrement operator?
Thanks for any clarification!
Bookmarks