From a607b80188d3cb63a25fca9a281bef2a60bf300d Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Thu, 26 Feb 2004 18:27:02 +0000 Subject: [PATCH] remove minmax hack from win32.hpp and fix all places that could be affected by the minmax macros [SVN r22394] --- include/boost/math/octonion.hpp | 26 +++++++++++++------------- include/boost/math/quaternion.hpp | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/boost/math/octonion.hpp b/include/boost/math/octonion.hpp index 5c83aca9a..b50ea21bd 100644 --- a/include/boost/math/octonion.hpp +++ b/include/boost/math/octonion.hpp @@ -969,7 +969,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max(); \ + type mixam = (BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max)(); \ \ tr *= mixam; \ \ @@ -1011,7 +1011,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1052,7 +1052,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1097,7 +1097,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max(); \ + type mixam = (BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max)();\ \ tr *= mixam; \ \ @@ -1141,7 +1141,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1184,7 +1184,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1234,7 +1234,7 @@ namespace boost tr[6] = static_cast(rhs.R_component_7()); \ tr[7] = static_cast(rhs.R_component_8()); \ \ - type mixam = BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max(); \ + type mixam = (BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max)();\ \ tr *= mixam; \ \ @@ -1283,7 +1283,7 @@ namespace boost tr[6] = static_cast(rhs.R_component_7()); \ tr[7] = static_cast(rhs.R_component_8()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1331,7 +1331,7 @@ namespace boost tr[6] = static_cast(rhs.R_component_7()); \ tr[7] = static_cast(rhs.R_component_8()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -4405,9 +4405,9 @@ namespace boost BOOST_OCTONION_VALARRAY_LOADER #if defined(__GNUC__) && __GNUC__ < 3 - return(BOOST_GET_VALARRAY(T, abs(temp)).max()); + return((BOOST_GET_VALARRAY(T, abs(temp)).max)()); #else - return(abs(temp).max()); + return((abs(temp).max)()); #endif /* defined(__GNUC__) && (__GNUC__ < 3) */ } @@ -4441,9 +4441,9 @@ namespace boost BOOST_OCTONION_VALARRAY_LOADER #if defined(__GNUC__) && __GNUC__ < 3 - T maxim = BOOST_GET_VALARRAY(T,abs(temp)).max(); // overflow protection + T maxim = (BOOST_GET_VALARRAY(T,abs(temp)).max)(); // overflow protection #else - T maxim = abs(temp).max(); // overflow protection + T maxim = (abs(temp).max)(); // overflow protection #endif /* defined(__GNUC__) && (__GNUC__ < 3) */ if (maxim == static_cast(0)) diff --git a/include/boost/math/quaternion.hpp b/include/boost/math/quaternion.hpp index 7e899c938..1983a9fe0 100644 --- a/include/boost/math/quaternion.hpp +++ b/include/boost/math/quaternion.hpp @@ -611,7 +611,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max(); \ + type mixam = (BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max)(); \ \ tr *= mixam; \ \ @@ -645,7 +645,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -678,7 +678,7 @@ namespace boost tr[0] = rhs.real(); \ tr[1] = rhs.imag(); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -716,7 +716,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max(); \ + type mixam = (BOOST_GET_VALARRAY(type,static_cast(1)/abs(tr)).max)(); \ \ tr *= mixam; \ \ @@ -753,7 +753,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -789,7 +789,7 @@ namespace boost tr[2] = static_cast(rhs.R_component_3()); \ tr[3] = static_cast(rhs.R_component_4()); \ \ - type mixam = static_cast(1)/abs(tr).max(); \ + type mixam = static_cast(1)/(abs(tr).max)(); \ \ tr *= mixam; \ \ @@ -1587,9 +1587,9 @@ namespace boost BOOST_QUATERNION_VALARRAY_LOADER #if defined(__GNUC__) && __GNUC__ < 3 - return(BOOST_GET_VALARRAY(T, abs(temp)).max()); + return((BOOST_GET_VALARRAY(T, abs(temp)).max)()); #else - return(abs(temp).max()); + return((abs(temp).max)()); #endif /* defined(__GNUC__) && (__GNUC__ < 3) */ } @@ -1623,9 +1623,9 @@ namespace boost BOOST_QUATERNION_VALARRAY_LOADER #if defined(__GNUC__) && __GNUC__ < 3 - T maxim = BOOST_GET_VALARRAY(T, abs(temp)).max(); // overflow protection + T maxim = (BOOST_GET_VALARRAY(T, abs(temp)).max)(); // overflow protection #else - T maxim = abs(temp).max(); // overflow protection + T maxim = (abs(temp).max)(); // overflow protection #endif /* defined(__GNUC__) && (__GNUC__ < 3) */ if (maxim == static_cast(0))