J
JC
Just to make sure, is the pre/post decrement operator valid on list::end()?In particular, assuming a non-empty, non-volatile list, will...
list<x> alist = ...; // non-empty
list<x>::iterator lastiter = -- alist.end();
.... always result in lastiter being a valid forward iterator for the last element in alist?
The reason I'm asking is because the only reference I was able to find was at http://www.sgi.com/tech/stl/BackInsertionSequence.html, which is trustworthy, but I wasn't able to find the validity explicitly stated anywhere (not that it isn't, I just couldn't find it).
Thanks!
J
list<x> alist = ...; // non-empty
list<x>::iterator lastiter = -- alist.end();
.... always result in lastiter being a valid forward iterator for the last element in alist?
The reason I'm asking is because the only reference I was able to find was at http://www.sgi.com/tech/stl/BackInsertionSequence.html, which is trustworthy, but I wasn't able to find the validity explicitly stated anywhere (not that it isn't, I just couldn't find it).
Thanks!
J