<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C++ 3 way compare</title><link>/technologies/code_exchange/b/blog/posts/c-3-way-compare</link><description>task: Let&amp;#39;s say that you are writing a C++ class, where the objects have to be sorted or compared.
In classic C++, you &amp;#39;d write an operator overload for &amp;lt;, &amp;lt;=, == , !=, &amp;gt;= and &amp;gt;. In modern C++, you can get all that fun...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: C++ 3 way compare</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/c-3-way-compare</link><pubDate>Mon, 03 Nov 2025 18:37:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:09ee1ad4-e802-40b4-922d-0d48c1e2662d</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;My&amp;nbsp;[tag:Modern+C_2B002B00_]&amp;nbsp;blogs were inspired by&amp;nbsp;&lt;a href="https://www.modernescpp.com/index.php/my-als-journey-31-31-the-end/" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Rainer Grimm&amp;#39;s modernes c++ articles&lt;/a&gt;. Sadly, he has recently passed away.&lt;br /&gt;Forever thankful.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="280" src="/resized-image/__size/598x560/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-09ee1ad4-e802-40b4-922d-0d48c1e2662d/pastedimage1762196657141v1.png" width="299" alt=" " /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=29073&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: C++ 3 way compare</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/c-3-way-compare</link><pubDate>Wed, 16 Jul 2025 11:36:46 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:09ee1ad4-e802-40b4-922d-0d48c1e2662d</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;one of the advantages of this mechanism, is that the STL built-in sorting algoritms work.&lt;/p&gt;
&lt;p&gt;If you have a container (e.g.: array, vector, list,...) of your objects, you can tell STL to sort them.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=29073&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: C++ 3 way compare</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/c-3-way-compare</link><pubDate>Tue, 15 Jul 2025 17:54:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:09ee1ad4-e802-40b4-922d-0d48c1e2662d</guid><dc:creator>kmikemoo</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;That is SUPER cool! Thanks for sharing, [mention:acaf6a9338de4eef8f6717d5561ed01d:e9ed411860ed4f2ba0265705b8793d05]&amp;nbsp;.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=29073&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: C++ 3 way compare</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/c-3-way-compare</link><pubDate>Tue, 15 Jul 2025 17:33:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:09ee1ad4-e802-40b4-922d-0d48c1e2662d</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice algorithm Jan.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=29073&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>