diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index 7a5fdc8e0..883e05015 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -121,8 +121,12 @@ struct EigenBase { * as the testsuite asserts std::is_trivially_destructible */ #if !defined(EIGEN_NO_DEBUG) && !defined(EIGEN_TESTING_PLAINOBJECT_CTOR) +#if __cpp_constexpr >= 201907L + EIGEN_DEVICE_FUNC constexpr ~EigenBase() {} +#else EIGEN_DEVICE_FUNC ~EigenBase() {} #endif +#endif }; /***************************************************************************