mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
(transplanted from 49b6e9143e
)
This commit is contained in:
@@ -61,7 +61,7 @@ template<typename MatrixType> void bandmatrix(const MatrixType& _m)
|
||||
m.col(i).setConstant(static_cast<RealScalar>(i+1));
|
||||
dm1.col(i).setConstant(static_cast<RealScalar>(i+1));
|
||||
}
|
||||
Index d = std::min(rows,cols);
|
||||
Index d = (std::min)(rows,cols);
|
||||
Index a = std::max<Index>(0,cols-d-supers);
|
||||
Index b = std::max<Index>(0,rows-d-subs);
|
||||
if(a>0) dm1.block(0,d+supers,rows,a).setZero();
|
||||
|
||||
Reference in New Issue
Block a user