#3207 closed Bugs (fixed)
cannot use both students_t.hpp and unit_test.hpp
| Reported by: | Owned by: | John Maddock | |
|---|---|---|---|
| Milestone: | Boost 1.40.0 | Component: | math |
| Version: | Boost Development Trunk | Severity: | Problem |
| Keywords: | Cc: |
Description
This code does not compile:
#include <boost/test/included/unit_test.hpp>
#include <boost/math/distributions/students_t.hpp>
static void log_test()
{
boost::math::students_t dist(0.5);
double p = boost::math::cdf(dist, 1.0);
}
I get this error message:
d:\dev\trunk\lib_boost\inc\boost\math\special_functions\log1p.hpp(407) : error C2882: 'log' : illegal use of namespace identifier in expression
it can be fixed by changing the offending line
return log(u)*(x/(u-1.0));
into
return ::log(u)*(x/(u-1.0));
but I am not sure if this is a good fix. I have tried this on an older version we are working with, and on the current svn trunk.
Note:
See TracTickets
for help on using tickets.

(In [54284]) Fix lookup ambiguity. Fixes #3207.