<?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[std::set eigene compare funktion]]></title><description><![CDATA[<p>wenn ich einem std::set eine eigene compare funktion mitgebe, was wird dann erwartet. eine &quot;&lt;&quot; relation?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/141140/std-set-eigene-compare-funktion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 10:00:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/141140.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Mar 2006 16:50:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 16:50:39 GMT]]></title><description><![CDATA[<p>wenn ich einem std::set eine eigene compare funktion mitgebe, was wird dann erwartet. eine &quot;&lt;&quot; relation?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019771</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 19 Mar 2006 16:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 16:53:43 GMT]]></title><description><![CDATA[<p>MSDN schrieb:</p>
<blockquote>
<p>On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate f(x,y) is a function object that has two argument objects x and y and a return value of true or false. An ordering imposed on a set is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects x and y are defined to be equivalent when both f(x,y) and f(y,x) are false. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other.</p>
</blockquote>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019775</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sun, 19 Mar 2006 16:53:43 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 17:01:16 GMT]]></title><description><![CDATA[<p>thx.</p>
<p>andere frage, um nicht noch nen thread aufzumachen:</p>
<p>darf man aus einem set, welches gerade mittels iterator durchlaufen wird, einträge löschen?</p>
<p>also sowas wie</p>
<p>xyz iter = bla.begin();<br />
for(;iter != bla.end();++iter) bla.erase(iter);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019781</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019781</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 19 Mar 2006 17:01:16 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 17:47:31 GMT]]></title><description><![CDATA[<p>da erase den iterator invalidiert, muss das etwas anders aussehen:</p>
<pre><code class="language-cpp">for(xyz iter = bla.begin();iter != bla.end();) bla.erase(iter++);
</code></pre>
<p>abgesehen davon bleiben - wie bei allen node-basierten containern - alle iteratoren bis auf die, die auf ein gelöschtes element zeigten gültig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019823</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019823</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sun, 19 Mar 2006 17:47:31 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 17:58:58 GMT]]></title><description><![CDATA[<p>also ne kopie vom iterator übergeben? warum macht erase so nen schmu? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019833</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 19 Mar 2006 17:58:58 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 18:46:37 GMT]]></title><description><![CDATA[<p>thordk schrieb:</p>
<blockquote>
<p>also ne kopie vom iterator übergeben?</p>
</blockquote>
<p>Nein, hochzählen, und erase mit dem alten Wert aufrufen.</p>
<blockquote>
<p>warum macht erase so nen schmu? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
</blockquote>
<p>Ich sehe schon, du hast das verstanden. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019867</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 19 Mar 2006 18:46:37 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 19:16:02 GMT]]></title><description><![CDATA[<p>Soweit ich weiß kann gibt iterator.erase einen gültigen iterator zurück also:</p>
<pre><code class="language-cpp">while (iterator != xxx.end())
{
   if (sollgeloeschtwerden(...))
   {
      iterator = iterator.erase();
   }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1019892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019892</guid><dc:creator><![CDATA[templäd]]></dc:creator><pubDate>Sun, 19 Mar 2006 19:16:02 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 19:20:00 GMT]]></title><description><![CDATA[<p>iterator++ nicht vergessen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019897</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019897</guid><dc:creator><![CDATA[templäd]]></dc:creator><pubDate>Sun, 19 Mar 2006 19:20:00 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 19:40:27 GMT]]></title><description><![CDATA[<p>templäd: Falsch, das geht nicht bei std::set und std::map.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019914</guid><dc:creator><![CDATA[-100 punkte]]></dc:creator><pubDate>Sun, 19 Mar 2006 19:40:27 GMT</pubDate></item><item><title><![CDATA[Reply to std::set eigene compare funktion on Sun, 19 Mar 2006 20:49:38 GMT]]></title><description><![CDATA[<blockquote>
<p>Nein, hochzählen, und erase mit dem alten Wert aufrufen.</p>
</blockquote>
<p>na, das is doch ne kopie <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019963</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 19 Mar 2006 20:49:38 GMT</pubDate></item></channel></rss>