[Boost-bugs] [Boost C++ Libraries] #5894: Missing <cmath> include for weighted_p_square_quantile

Subject: [Boost-bugs] [Boost C++ Libraries] #5894: Missing <cmath> include for weighted_p_square_quantile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-13 15:07:57


#5894: Missing <cmath> include for weighted_p_square_quantile
--------------------------------------------+-------------------------------
 Reporter: David Kirkby <dkirkby@…> | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: accumulator
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
--------------------------------------------+-------------------------------
 I am using i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build
 5666) (dot 3)

 The error is:

 /usr/local/include/boost/accumulators/statistics/weighted_p_square_quantile.hpp:178:
 error: call of overloaded 'abs(double&)' 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
 __gnu_cxx::abs(long long int)

 The correct overload is from <cmath> but this is not included. I have
 tested that added the include fixes the problem.

 As a workaround, including <cmath> before
 <.../weighted_p_square_quantile.hpp> in your own source fixes the problem.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5894>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC