Topic: Standard container(or iterator)-specialized standard algorithms?


Author: NDos Dannyu <ndospark320@naver.com>
Date: Thu, 30 Apr 2015 22:02:30 -0700 (PDT)
Raw View
------=_Part_346_239907262.1430456550228
Content-Type: multipart/alternative;
 boundary="----=_Part_347_1294853348.1430456550239"

------=_Part_347_1294853348.1430456550239
Content-Type: text/plain; charset=UTF-8

For *std::list*, std::move, std::swap, std::swap_range, std::rotate would
run at amortized time O(1), without invalidating any iterators.
(std::swap_range even would swap ranges of different size)
For *std::vector* and *std::deque*, std::sort would behave differently, as
we can probably yield sorted range with the range "slided" up or down, and
then just adjust the begin iterator.

--

---
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_347_1294853348.1430456550239
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>For <strong>std::list</strong>, std::move, std::swap,=
 std::swap_range, std::rotate&nbsp;would run at amortized time O(1), withou=
t invalidating any iterators. (std::swap_range even would swap ranges of di=
fferent size)</div><div>For <strong>std::vector</strong> and <strong>std::d=
eque</strong>, std::sort&nbsp;would behave differently, as we can probably =
yield sorted range with the range "slided" up or down, and then just adjust=
 the begin iterator.</div><div><br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<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 />

------=_Part_347_1294853348.1430456550239--
------=_Part_346_239907262.1430456550228--

.