mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix remaining MSVC warnings in Windows CI (C4804, C4244, C4146, C4305)
libeigen/eigen!2374 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -2097,7 +2097,15 @@ struct expm1_impl<std::complex<RealScalar>> {
|
||||
|
||||
template <typename T>
|
||||
struct rsqrt_impl {
|
||||
// C4804: unsafe use of type 'bool' in operation. Unavoidable when instantiated with T=bool.
|
||||
#if EIGEN_COMP_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4804)
|
||||
#endif
|
||||
EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE T run(const T& x) { return T(1) / numext::sqrt(x); }
|
||||
#if EIGEN_COMP_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
// IWYU pragma: private
|
||||
#include "./InternalHeaderCheck.h"
|
||||
|
||||
// C4804: unsafe use of type 'bool' in operation. Unavoidable in generic code
|
||||
// instantiated with bool scalars (e.g. += and * on bool).
|
||||
#if EIGEN_COMP_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4804)
|
||||
#endif
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
@@ -1260,4 +1267,8 @@ struct generic_product_impl<Lhs, Rhs, HomogeneousShape, PermutationShape, Produc
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
#if EIGEN_COMP_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // EIGEN_PRODUCT_EVALUATORS_H
|
||||
|
||||
Reference in New Issue
Block a user