aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-05-15 08:18:39 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-05-15 08:18:39 +0200
commit695a7ab9d74f53a9576e74e87410d7c9ce5abe73 (patch)
treeb7510bc0f16df9aa067916742e873bb87104a81e /unsupported
parentb5f70814c1005a39b0ff084f55360337b3b8ebd8 (diff)
protect min/max with parenthesis
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
index d6c2a29de..70d3222f5 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h
@@ -539,13 +539,13 @@ inline const AutoDiffScalar<DerType>& real(const AutoDiffScalar<DerType>& x) {
template<typename DerType>
inline typename DerType::Scalar imag(const AutoDiffScalar<DerType>&) { return 0.; }
template<typename DerType, typename T>
-inline AutoDiffScalar<DerType> min(const AutoDiffScalar<DerType>& x, const T& y) { return (x <= y ? x : y); }
+inline AutoDiffScalar<DerType> (min)(const AutoDiffScalar<DerType>& x, const T& y) { return (x <= y ? x : y); }
template<typename DerType, typename T>
-inline AutoDiffScalar<DerType> max(const AutoDiffScalar<DerType>& x, const T& y) { return (x >= y ? x : y); }
+inline AutoDiffScalar<DerType> (max)(const AutoDiffScalar<DerType>& x, const T& y) { return (x >= y ? x : y); }
template<typename DerType, typename T>
-inline AutoDiffScalar<DerType> min(const T& x, const AutoDiffScalar<DerType>& y) { return (x < y ? x : y); }
+inline AutoDiffScalar<DerType> (min)(const T& x, const AutoDiffScalar<DerType>& y) { return (x < y ? x : y); }
template<typename DerType, typename T>
-inline AutoDiffScalar<DerType> max(const T& x, const AutoDiffScalar<DerType>& y) { return (x > y ? x : y); }
+inline AutoDiffScalar<DerType> (max)(const T& x, const AutoDiffScalar<DerType>& y) { return (x > y ? x : y); }
#define sign(x) x >= 0 ? 1 : -1 // required for abs function below