[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g++ 3.0.4: std::vector<...>.erase (iterator): preconditions?
From: |
André Pönitz |
Subject: |
Re: g++ 3.0.4: std::vector<...>.erase (iterator): preconditions? |
Date: |
4 Apr 2002 06:32:01 GMT |
Peter M?ller <address@hidden> wrote:
> dumps core in g++ 3.0.4. IMHO erase (end ()) is perfectly legal and
> may frequently occur. Furthermore v.erase(v.end ()) must be equivalent
> to v.erase (v.end (), v.end ()).
The sequence requirement in 23.1.1 talk about 'a.erase(q) erases
the element pointed to by q'.
Now, although this does not explicitly say that q can't be v.end(), there
is certainly no 'element pointed to by v.end()'.
So _I_ would think, erase(v.end()) is not legal. But you might want to ask
the people over in comp.lang.c++.moderated or similar.
Andre'
--
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)