
31 Aug
2004
31 Aug
'04
9:51 a.m.
I would expect it to return .end() iterator in this case.
Is this behavior correct according to standard or not? If not, is it reasonable to submit bug report?
Yes, the std says: "The iterator returned by a.erase(q1,q2) points to the element pointed to by q2 prior to any elements being erased. If no such element exists, a.end() is returned." So your expectations were valid, and the implementation appears to have a bug. John.