Boost C++ Libraries: Ticket #13225: operator != fails in classes derived from boost::rational https://svn.boost.org/trac10/ticket/13225 <p> In a class derived from boost::rational operator != seems to return "false" always. </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/rational.hpp&gt; struct RationalNumber : public boost::rational&lt;int&gt; { RationalNumber(int n, int d) : boost::rational&lt;int&gt;(n, d) {} }; using namespace std; template &lt;typename T&gt; void check() { T r(2, 3); T q(2, 3); T s(2, 4); cout &lt;&lt; (r!=q) &lt;&lt; " " &lt;&lt; (r!=s) &lt;&lt; endl; } int main() { check&lt;boost::rational&lt;long long&gt;&gt;(); // works cout &lt;&lt; "---------------" &lt;&lt; endl; check&lt;RationalNumber&gt;(); // fails for boost version &gt; 1_63_0 return 0; } </pre><p> Bug appears since boost version 1_64_0 and is present in current development trunk (git repository on 20170921) still. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13225 Trac 1.4.3