|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80979 - branches/release/libs/math/src/tr1
From: john_at_[hidden]
Date: 2012-10-13 13:55:05
Author: johnmaddock
Date: 2012-10-13 13:55:04 EDT (Sat, 13 Oct 2012)
New Revision: 80979
URL: http://svn.boost.org/trac/boost/changeset/80979
Log:
Merge from Trunk a fix for builds that have no long double support.
Text files modified:
branches/release/libs/math/src/tr1/nexttoward.cpp | 4 ++++
branches/release/libs/math/src/tr1/nexttowardf.cpp | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
Modified: branches/release/libs/math/src/tr1/nexttoward.cpp
==============================================================================
--- branches/release/libs/math/src/tr1/nexttoward.cpp (original)
+++ branches/release/libs/math/src/tr1/nexttoward.cpp 2012-10-13 13:55:04 EDT (Sat, 13 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: branches/release/libs/math/src/tr1/nexttowardf.cpp
==============================================================================
--- branches/release/libs/math/src/tr1/nexttowardf.cpp (original)
+++ branches/release/libs/math/src/tr1/nexttowardf.cpp 2012-10-13 13:55:04 EDT (Sat, 13 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