Boost C++ Libraries: Ticket #8620: Boost.Variant has no inequality operator https://svn.boost.org/trac10/ticket/8620 <p> The Boost.Variant does not support inequality, e.g. </p> <p> typedef boost::variant&lt;int&gt; Variant; </p> <p> Variant var1; Variant var2; </p> <p> if (!(var1 == var2)) { } </p> <p> It would ofc be nicer if </p> <p> if (var1 != var2) { } </p> <p> Boost.operators already solve this problem (by deriving from equality_comparable or even better totally_ordered); not sure if this would help. The downside is that Boost.Variant is already a compile time cpu hog; with Boost.Operators it may be even worse. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8620 Trac 1.4.3 Antony Polukhin Wed, 03 Dec 2014 17:44:02 GMT owner, status, milestone changed https://svn.boost.org/trac10/ticket/8620#comment:1 https://svn.boost.org/trac10/ticket/8620#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">ebf</span> to <span class="trac-author">Antony Polukhin</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.58.0</span> </li> </ul> <p> Added missing operators to <a class="ext-link" href="https://github.com/boostorg/variant/commit/6db941f3ddc77851e3ce3f596b0273a72e440509"><span class="icon">​</span>the develop branch</a>. </p> Ticket Antony Polukhin Mon, 09 Mar 2015 11:51:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8620#comment:2 https://svn.boost.org/trac10/ticket/8620#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket