Opened 12 years ago

Closed 12 years ago

#4794 closed Bugs (fixed)

Error in namespace resolution when including cbrt.hpp

Reported by: anonymous Owned by: John Maddock
Milestone: To Be Determined Component: None
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

When building opencog with boost 1.44.0

[ 92%] Building CXX object opencog/learning/moses/CMakeFiles/moses.dir/eda/initialization.cc.o In file included from /usr/local/include/boost/math/special_functions/detail/t_distribution_inv.hpp:14,

from /usr/local/include/boost/math/special_functions/detail/ibeta_inverse.hpp:17, from /usr/local/include/boost/math/special_functions/beta.hpp:1437, from /usr/local/include/boost/math/special_functions/binomial.hpp:14, from /Users/smane/Documents/Software/opencog/opencog/learning/moses/eda/../moses/neighborhood_sampling.h:29, from /Users/smane/Documents/Software/opencog/opencog/learning/moses/eda/initialization.cc:25:

/usr/local/include/boost/math/special_functions/cbrt.hpp: In function ‘T boost::math::detail::cbrt_imp(T, const Policy&)’: /usr/local/include/boost/math/special_functions/cbrt.hpp:72: error: expected unqualified-id before ‘(’ token

The fix for this is to replace "if(!boost::math::isfinite(z))" with "if(!isfinite(z))" in function cbrt_imp().

Change History (1)

comment:1 by John Maddock, 12 years ago

Resolution: fixed
Status: newclosed

This will be fixed in the next release (it's been fixed for a while in SVN).

The correct fix to maintain genericity (and cross platform support) is to use !(boost::math::isfinite)(z) so that macro expansion of isfinite is suppressed.

HTH, John.

Note: See TracTickets for help on using tickets.