Opened 8 years ago

Closed 7 years ago

#10950 closed Bugs (fixed)

Missing std:: qualifier on sqrt calls in boost/random/non_central_chi_squared_distribution.hpp

Reported by: Aparna Kumta <aparna.kumta@…> Owned by: No-Maintainer
Milestone: To Be Determined Component: random
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

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());

Change History (1)

comment:1 by Steven Watanabe, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.