|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80932 - trunk/libs/math/src/tr1
From: john_at_[hidden]
Date: 2012-10-10 08:21:18
Author: johnmaddock
Date: 2012-10-10 08:21:16 EDT (Wed, 10 Oct 2012)
New Revision: 80932
URL: http://svn.boost.org/trac/boost/changeset/80932
Log:
Fix for build failure when there are no long double functions.
Fixes #7485.
Text files modified:
trunk/libs/math/src/tr1/nexttoward.cpp | 4 ++++
trunk/libs/math/src/tr1/nexttowardf.cpp | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/libs/math/src/tr1/nexttoward.cpp
==============================================================================
--- trunk/libs/math/src/tr1/nexttoward.cpp (original)
+++ trunk/libs/math/src/tr1/nexttoward.cpp 2012-10-10 08:21:16 EDT (Wed, 10 Oct 2012)
@@ -15,7 +15,11 @@
extern "C" double BOOST_MATH_TR1_DECL boost_nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y) BOOST_MATH_C99_THROW_SPEC
{
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ return c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(x, (double)y);
+#else
return (double)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
+#endif
}
}}}
Modified: trunk/libs/math/src/tr1/nexttowardf.cpp
==============================================================================
--- trunk/libs/math/src/tr1/nexttowardf.cpp (original)
+++ trunk/libs/math/src/tr1/nexttowardf.cpp 2012-10-10 08:21:16 EDT (Wed, 10 Oct 2012)
@@ -15,7 +15,11 @@
extern "C" float BOOST_MATH_TR1_DECL boost_nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) BOOST_MATH_C99_THROW_SPEC
{
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((double)x, (double)y);
+#else
return (float)c_policies::nextafter BOOST_PREVENT_MACRO_SUBSTITUTION((long double)x, y);
+#endif
}
}}}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk