Topic: the destination range of std::set_difference and std::set_intersection


Author: Victor.Khomenko@ncl.ac.uk
Date: Sun, 7 Jul 2013 12:52:06 -0700 (PDT)
Raw View
------=_Part_8552_12987985.1373226726173
Content-Type: text/plain; charset=ISO-8859-1

The beginning of the destination range of std::set_difference and
std::set_intersection should be allowed to coincide with the beginning of
the first source range. (This is currently not allowed.)
This will never lead to an overflow and seems simple to implement,
while allowing to avoid creating intermediate ranges in often used cases
like

A:=A intersection B;
C:=C\D;

Obviously, this does not work for std::set_union, as it can lead to
overflows.

--

---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.



------=_Part_8552_12987985.1373226726173
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>The beginning of the destination range of std::set_difference and std:=
:set_intersection should be allowed to coincide with the beginning of the f=
irst source range. (This is currently not allowed.) </div><div>This will ne=
ver lead to an overflow and&nbsp;seems simple to implement, while&nbsp;allo=
wing to avoid creating intermediate ranges in often used cases like</div><d=
iv>&nbsp;</div><div>A:=3DA intersection B;</div><div><div>C:=3DC\D;</div><d=
iv>&nbsp;</div><div>Obviously, this does not work for std::set_union, as it=
 can lead to overflows.</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_8552_12987985.1373226726173--

.