|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76093 - in trunk/boost/math: concepts special_functions special_functions/detail
From: john_at_[hidden]
Date: 2011-12-21 11:37:32
Author: johnmaddock
Date: 2011-12-21 11:37:32 EST (Wed, 21 Dec 2011)
New Revision: 76093
URL: http://svn.boost.org/trac/boost/changeset/76093
Log:
Apply patch from #6192.
Plus fix a few other issues that arise when BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS is set.
Fixes #6192.
Text files modified:
trunk/boost/math/concepts/real_concept.hpp | 2 +-
trunk/boost/math/special_functions/detail/fp_traits.hpp | 4 ++--
trunk/boost/math/special_functions/fpclassify.hpp | 12 ++++++------
3 files changed, 9 insertions(+), 9 deletions(-)
Modified: trunk/boost/math/concepts/real_concept.hpp
==============================================================================
--- trunk/boost/math/concepts/real_concept.hpp (original)
+++ trunk/boost/math/concepts/real_concept.hpp 2011-12-21 11:37:32 EST (Wed, 21 Dec 2011)
@@ -372,7 +372,7 @@
} // namespace tools
-#if defined(__SGI_STL_PORT)
+#if defined(__SGI_STL_PORT) || defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
//
// We shouldn't really need these type casts any more, but there are some
// STLport iostream bugs we work around by using them....
Modified: trunk/boost/math/special_functions/detail/fp_traits.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/fp_traits.hpp (original)
+++ trunk/boost/math/special_functions/detail/fp_traits.hpp 2011-12-21 11:37:32 EST (Wed, 21 Dec 2011)
@@ -101,11 +101,11 @@
// These helper functions are used only when numeric_limits<>
// members are not compile time constants:
//
-inline bool is_generic_tag_false(const generic_tag<false>&)
+inline bool is_generic_tag_false(const generic_tag<false>*)
{
return true;
}
-inline bool is_generic_tag_false(...)
+inline bool is_generic_tag_false(const void*)
{
return false;
}
Modified: trunk/boost/math/special_functions/fpclassify.hpp
==============================================================================
--- trunk/boost/math/special_functions/fpclassify.hpp (original)
+++ trunk/boost/math/special_functions/fpclassify.hpp 2011-12-21 11:37:32 EST (Wed, 21 Dec 2011)
@@ -167,7 +167,7 @@
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
- return fp_classify_imp(t, mpl::true_());
+ return fpclassify_imp(t, generic_tag<true>());
#endif
//
// An unknown type with no numeric_limits support,
@@ -250,7 +250,7 @@
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(method()))
+ if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
return detail::fpclassify_imp(t, detail::generic_tag<true>());
return detail::fpclassify_imp(t, method());
#else
@@ -280,7 +280,7 @@
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
- return isfinite_impl(x, mpl::true_());
+ return isfinite_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression.
return true;
@@ -340,7 +340,7 @@
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
- return isnormal_impl(x, mpl::true_());
+ return isnormal_impl(x, generic_tag<true>());
#endif
return !(x == 0);
}
@@ -400,7 +400,7 @@
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
- return isinf_impl(x, mpl::true_());
+ return isinf_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression.
return false;
@@ -476,7 +476,7 @@
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized)
- return isnan_impl(x, mpl::true_());
+ return isnan_impl(x, generic_tag<true>());
#endif
(void)x; // warning supression
return false;
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