<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Liste umstapeln nur mit iteratoren?]]></title><description><![CDATA[<p>Hallo,<br />
kann ich Elemente in einer Liste an den Anfang verschieben, wenn ich nur zwei Iteratoren für den Anfang und das Ende der Liste habe und keine Referenz auf das list-Objekt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/236558/liste-umstapeln-nur-mit-iteratoren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 18:31:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/236558.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Mar 2009 22:34:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Mon, 16 Mar 2009 22:34:44 GMT]]></title><description><![CDATA[<p>Hallo,<br />
kann ich Elemente in einer Liste an den Anfang verschieben, wenn ich nur zwei Iteratoren für den Anfang und das Ende der Liste habe und keine Referenz auf das list-Objekt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681208</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681208</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 16 Mar 2009 22:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 01:22:47 GMT]]></title><description><![CDATA[<p>Nope.<br />
Wüsste zumindest nicht wie.<br />
Du kannst natürlich lustig rumkopieren (Elemente zuweisen, aka. operator =), aber nix verschieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681234</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 17 Mar 2009 01:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 06:42:44 GMT]]></title><description><![CDATA[<p>hi nochmal</p>
<p>habs grad mit <code>std::iter_swap()</code> hinbekommen<br />
dabei kommt mir doch gleich die nächste frage: was genau ist der unterschied von <code>std::swap()</code> zu <code>std::iter_swap()</code> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681256</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 17 Mar 2009 06:42:44 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 06:50:13 GMT]]></title><description><![CDATA[<p>Naja, der Unterschied ist in meinen Augen nicht direkt ein Unterschied.<br />
<code>std::iter_swap()</code> verwendet intern <code>std::swap()</code> (zumindest laut Referenz).<br />
Schau hier:<br />
<a href="http://www.cplusplus.com/reference/algorithm/iter_swap.html" rel="nofollow">http://www.cplusplus.com/reference/algorithm/iter_swap.html</a><br />
<a href="http://www.cplusplus.com/reference/algorithm/swap.html" rel="nofollow">http://www.cplusplus.com/reference/algorithm/swap.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681258</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Tue, 17 Mar 2009 06:50:13 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 06:52:09 GMT]]></title><description><![CDATA[<p>iter_swap tauscht den Wert (also &quot;Inhalt&quot;) zweier Iteratoren. Es entspricht also:</p>
<pre><code class="language-cpp">std::iter_swap( it1, it2 );
// =^
std::swap( *it1, *it2 );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1681260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681260</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 17 Mar 2009 06:52:09 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 19:39:34 GMT]]></title><description><![CDATA[<p>daersc schrieb:</p>
<blockquote>
<p>habs grad mit <code>std::iter_swap()</code> hinbekommen</p>
</blockquote>
<p>Das ist aber nicht wirklich ein Verschieben, sondern ein Tausch.</p>
<p>Verschieben würdest du mit <code>std::copy()</code> hinbekommen (wie von hustbaer erwähnt), aber das ist nicht gerade effizient.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681796</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681796</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Tue, 17 Mar 2009 19:39:34 GMT</pubDate></item><item><title><![CDATA[Reply to Liste umstapeln nur mit iteratoren? on Tue, 17 Mar 2009 21:09:34 GMT]]></title><description><![CDATA[<p>ich habs bei mir ausprobiert und danach sind die elemente in der ausgangsreihenfolge, nur dass die &quot;verschobenen&quot; eben am Anfang stehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1681831</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1681831</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 17 Mar 2009 21:09:34 GMT</pubDate></item></channel></rss>