https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69081
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2016-01-04
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to William Li from comment #0)
> It supposes to transfer elements [first, last). If the last is before the
> first, then [first, last) shall be empty set mathematically.
The title of this report talks about first<=last, the text above talks about
last<first, and the example shows first==last ... could you clarify exactly
what you're reporting?
In any case, this is not mathematics, it's C++, and that function's
preconditions include:
(first,last) is a valid range in x, and all iterators in the range (first,last)
are dereferenceable.
So your example is undefined.