Boost C++ Libraries: Ticket #10845: Generic comparison operators https://svn.boost.org/trac10/ticket/10845 <p> It could be useful to have comparison operators with types that are held in variant. For example: </p> <pre class="wiki">variant&lt;int, string&gt; v1(1), v2("2"); if (v1 &lt; 1 || v2 &gt; "hello") { // ... } if (v1 &lt; 1.0) { // compilation error // ... } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10845 Trac 1.4.3 Antony Polukhin Mon, 20 Sep 2021 17:34:30 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10845#comment:1 https://svn.boost.org/trac10/ticket/10845#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Moved the issue to github <a class="ext-link" href="https://github.com/boostorg/variant/issues/95"><span class="icon">​</span>https://github.com/boostorg/variant/issues/95</a> </p> Ticket