Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67279 - trunk/boost/math/policies
From: john_at_[hidden]
Date: 2010-12-16 13:37:53


Author: johnmaddock
Date: 2010-12-16 13:37:50 EST (Thu, 16 Dec 2010)
New Revision: 67279
URL: http://svn.boost.org/trac/boost/changeset/67279

Log:
Fix min/max usage.
Text files modified:
   trunk/boost/math/policies/error_handling.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/math/policies/error_handling.hpp
==============================================================================
--- trunk/boost/math/policies/error_handling.hpp (original)
+++ trunk/boost/math/policies/error_handling.hpp 2010-12-16 13:37:50 EST (Thu, 16 Dec 2010)
@@ -404,7 +404,7 @@
 {
    // This may or may not do the right thing, but the user asked for the error
    // to be ignored so here we go anyway:
- return std::numeric_limits<T>::is_specialized ? (val > 0 ? std::numeric_limits<T>::max() : -std::numeric_limits<T>::max()): val;
+ return std::numeric_limits<T>::is_specialized ? (val > 0 ? (std::numeric_limits<T>::max)() : -(std::numeric_limits<T>::max)()): val;
 }
 
 template <class T, class TargetType>
@@ -418,7 +418,7 @@
    errno = ERANGE;
    // This may or may not do the right thing, but the user asked for the error
    // to be silent so here we go anyway:
- return std::numeric_limits<T>::is_specialized ? (val > 0 ? std::numeric_limits<T>::max() : -std::numeric_limits<T>::max()): val;
+ return std::numeric_limits<T>::is_specialized ? (val > 0 ? (std::numeric_limits<T>::max)() : -(std::numeric_limits<T>::max)()): val;
 }
 
 template <class T, class TargetType>


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