10 Sep
2009
10 Sep
'09
2:47 p.m.
Steven Watanabe wrote:
The ability to decrement any bidirectional iterator except begin() is required by the standard. All Bidirectional iterators /must/ support this, including the iterators of std::vector. (See 24.1.4, Table 75)
I guess I was conflating the case of (iterator returned by a bidirectional container's end()) with (end-marker iterator obtained by default-constructing certain types of iterators). I'm glad to learn that you can reliably decrement the iterator returned by end(), providing it's not equal to the iterator returned by begin().