From: Pavol Droba (droba_at_[hidden])
Date: 2004-08-31 06:13:57
On Tue, Aug 31, 2004 at 11:45:50AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
> Pavol Droba ha escrito:
> > Hi,
> > I have encountered a problem with vc8.0 std library. I was able to fix
> > it, but I'm not sure what is correct according to standard.
> > The problem can be narrowed to one simple case. In vc8.0 method
> > iterator std::list<>::erase(iterator First, iterator Last)
> > returns a 'singular' iterator when the list is empty after erase operation.
> > Because I'm dependant on the returned iterator to make insertion
> > at this point later on, I had to make an explicit workaroud.
> > 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?
> The std says in lib.sequence.reqmts (188.8.131.52):
> "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
> So, it seems to me like a bug in VC8.0 stdlib.
Thanks for explanation. I have submitted a bug report to microsoft.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk