Boost C++ Libraries: Ticket #5894: Missing <cmath> include for weighted_p_square_quantile https://svn.boost.org/trac10/ticket/5894 <p> I am using i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) </p> <p> The error is: </p> <p> /usr/local/include/boost/accumulators/statistics/weighted_p_square_quantile.hpp:178: error: call of overloaded 'abs(double&amp;)' is ambiguous /usr/include/stdlib.h:146: note: candidates are: int abs(int) /usr/include/c++/4.2.1/cstdlib:143: note: long int std::abs(long int) /usr/include/c++/4.2.1/cstdlib:174: note: long long int <span class="underline">gnu_cxx::abs(long long int) </span></p> <p> The correct overload is from &lt;cmath&gt; but this is not included. I have tested that added the include fixes the problem. </p> <p> As a workaround, including &lt;cmath&gt; before &lt;.../weighted_p_square_quantile.hpp&gt; in your own source fixes the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5894 Trac 1.4.3 Eric Niebler Tue, 13 Sep 2011 15:35:13 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5894#comment:1 https://svn.boost.org/trac10/ticket/5894#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">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/74367" title="merged [74366] from trunk, fixes #5894">[74367]</a>) merged <a class="changeset" href="https://svn.boost.org/trac10/changeset/74366" title="add missing &lt;cmath&gt; include">[74366]</a> from trunk, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5894" title="#5894: Bugs: Missing &lt;cmath&gt; include for weighted_p_square_quantile (closed: fixed)">#5894</a> </p> Ticket