Subject: [Boost-bugs] [Boost C++ Libraries] #10950: Missing std:: qualifier on sqrt calls in boost/random/non_central_chi_squared_distribution.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-21 21:13:43
#10950: Missing std:: qualifier on sqrt calls in
boost/random/non_central_chi_squared_distribution.hpp
-------------------------------------------+---------------------------
Reporter: Aparna Kumta <aparna.kumta@â¦> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------------+---------------------------
Compiling libs/random/test/test_non_central_chi_squared_distribution.cpp
on Solaris 11.2 with Oracle Solaris Studio12.4 using -library=stlport4, we
see the following error:
"../boost/random/non_central_chi_squared_distribution.hpp", line 149:
Error: The function "sqrt" must have a prototype.
In file boost/random/non_central_chi_squared_distribution.hpp, the
following change resolves the issue.
diff ./non_central_chi_squared_distribution.hpp
./non_central_chi_squared_distribution.hpp_new
18a19
> #include <cmath>
149c150
< RealType term1 = _z + sqrt(_param.lambda());
---
> RealType term1 = _z + std::sqrt(_param.lambda());
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10950> 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:17 UTC