From 812a599a122156fceea16227eac32769e6e9b9cd Mon Sep 17 00:00:00 2001 From: Maik Nijhuis Date: Wed, 17 Apr 2024 15:13:29 +0200 Subject: [PATCH 1/2] Avoid warnings in compiler version checks --- include/xtensor/xmath.hpp | 5 +---- include/xtensor/xutils.hpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/xtensor/xmath.hpp b/include/xtensor/xmath.hpp index 6e32df15b..dc3f1c176 100644 --- a/include/xtensor/xmath.hpp +++ b/include/xtensor/xmath.hpp @@ -1087,10 +1087,8 @@ namespace xt return xfunction_type(detail::lambda_adapt(std::forward(lambda)), std::forward(args)...); } -#define XTENSOR_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) - // Workaround for MSVC 2015 & GCC 4.9 -#if (defined(_MSC_VER) && _MSC_VER < 1910) || (defined(__GNUC__) && GCC_VERSION < 49999) +#if (defined(_MSC_VER) && _MSC_VER < 1910) || (defined(__GNUC__) && __GNUC__ < 5) #define XTENSOR_DISABLE_LAMBDA_FCT #endif @@ -1160,7 +1158,6 @@ namespace xt #endif } -#undef XTENSOR_GCC_VERSION #undef XTENSOR_DISABLE_LAMBDA_FCT namespace detail diff --git a/include/xtensor/xutils.hpp b/include/xtensor/xutils.hpp index 21c452489..bf19f85d2 100644 --- a/include/xtensor/xutils.hpp +++ b/include/xtensor/xutils.hpp @@ -30,7 +30,7 @@ #include "xtensor_config.hpp" -#if (_MSC_VER >= 1910) +#if (defined(_MSC_VER) && _MSC_VER >= 1910) #define NOEXCEPT(T) #else #define NOEXCEPT(T) noexcept(T) From 6601e9318bc251803f9d367b23686fa1d30e6daf Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 20 Nov 2024 15:16:46 +0100 Subject: [PATCH 2/2] Trigger CI