Subject: [Boost-bugs] [Boost C++ Libraries] #3207: cannot use both students_t.hpp and unit_test.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-06-23 13:10:45
#3207: cannot use both students_t.hpp and unit_test.hpp
-----------------------------------------------------+----------------------
Reporter: Martin Ankerl <martin.ankerl@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: math
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-----------------------------------------------------+----------------------
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3207> 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:00 UTC