Opened 10 years ago

Closed 10 years ago

#7485 closed Bugs (fixed)

build failure with BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS

Reported by: kab@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.52.0 Severity: Regression
Keywords: Cc:

Description

With boost-1.52 beta1, and possibly earlier, I'm no longer able to build with BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS. I'm getting errors like that below when defining that variable in $BOOST_ROOT/boost/math/tools/user.hpp. This works in boost-1.49; I haven't tried to narrow down the introduction of this issue more narrowly than that. I don't think it matters, but this is with gcc4.5 and gcc4.6.

The promote_args class template in boost/math/tools/promotion.hpp has a static assertion that errors if the result type is long double and BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS is defined.

In file included from ./boost/math/special_functions/math_fwd.hpp:27:0,

from ./boost/math/special_functions/sign.hpp:17, from ./boost/lexical_cast.hpp:165, from ./boost/math/special_functions/gamma.hpp:24, from ./boost/math/special_functions/detail/bessel_jy.hpp:14, from ./boost/math/special_functions/bessel.hpp:17, from ./boost/math/special_functions/airy.hpp:10, from ./boost/math/special_functions.hpp:15, from libs/math/src/tr1/pch.hpp:9, from libs/math/build/../src/tr1/nexttoward.cpp:6:

./boost/math/tools/promotion.hpp: In instantiation of 'boost::math::tools::promote_args<long double, float, float, float, float, float>':

./boost/math/special_functions/fpclassify.hpp:252:50: instantiated from 'int boost::math::fpclassify(T) [with T = long double]'

./boost/math/special_functions/next.hpp:177:47: instantiated from 'T boost::math::float_prior(const T&, const Policy&) [with T = long double, Policy = boost::math::policies::policy<boost::math::policies::domain_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::pole_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::overflow_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::evaluation_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::rounding_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]'

./boost/math/special_functions/next.hpp:245:123: instantiated from 'T boost::math::nextafter(const T&, const T&, const Policy&) [with T = long double, Policy = boost::math::policies::policy<boost::math::policies::domain_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::pole_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::overflow_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::evaluation_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::rounding_error<(boost::math::policies::error_policy_type)1u>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]'

libs/math/build/../src/tr1/c_policy.hpp:129:15801: instantiated from 'T c_policies::nextafter(const T&, const T&) [with T = long double]'

libs/math/build/../src/tr1/nexttoward.cpp:18:59: instantiated from here

./boost/math/tools/promotion.hpp:141:10: error: static assertion failed: "(0 == ::boost::is_same<type, long double>::value)"

Change History (2)

comment:1 by John Maddock, 10 years ago

Component: Nonemath
Owner: set to John Maddock
Status: newassigned

comment:2 by John Maddock, 10 years ago

Resolution: fixed
Status: assignedclosed

(In [80932]) Fix for build failure when there are no long double functions. Fixes #7485.

Note: See TracTickets for help on using tickets.