Boost C++ Libraries: Ticket #4794: Error in namespace resolution when including cbrt.hpp https://svn.boost.org/trac10/ticket/4794 <p> When building opencog with boost 1.44.0 </p> <p> [ 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, </p> <blockquote> <p> 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: </p> </blockquote> <p> /usr/local/include/boost/math/special_functions/cbrt.hpp: In function ‘T boost::math::detail::cbrt_imp(T, const Policy&amp;)’: /usr/local/include/boost/math/special_functions/cbrt.hpp:72: error: expected unqualified-id before ‘(’ token </p> <p> The fix for this is to replace "if(!boost::math::isfinite(z))" with "if(!isfinite(z))" in function cbrt_imp(). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4794 Trac 1.4.3 John Maddock Wed, 27 Oct 2010 12:01:41 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4794#comment:1 https://svn.boost.org/trac10/ticket/4794#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This will be fixed in the next release (it's been fixed for a while in SVN). </p> <p> 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. </p> <p> HTH, John. </p> Ticket