Opened 11 years ago

Closed 11 years ago

#5894 closed Bugs (fixed)

Missing <cmath> include for weighted_p_square_quantile

Reported by: David Kirkby <dkirkby@…> Owned by: Eric Niebler
Milestone: To Be Determined Component: accumulator
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by Eric Niebler, 11 years ago

Resolution: fixed
Status: newclosed

(In [74367]) merged [74366] from trunk, fixes #5894

Note: See TracTickets for help on using tickets.