diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 9dda28fef..cc77799d7 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -658,7 +658,7 @@ struct ei_pow_default_impl static inline Scalar run(Scalar x, Scalar y) { int res = 1; - if(NumTraits::IsSigned) ei_assert(y >= 0); + ei_assert(!NumTraits::IsSigned || y >= 0); if(y & 1) res *= x; y >>= 1; while(y)