Skip to content

Commit

Permalink
Merge pull request #2781 from mnijhuis-tos/compiler-version-checks
Browse files Browse the repository at this point in the history
Avoid warnings in compiler version checks
  • Loading branch information
JohanMabille authored Nov 20, 2024
2 parents 48b2d85 + 6601e93 commit ae52796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions include/xtensor/xmath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,10 +1088,8 @@ namespace xt
return xfunction_type(detail::lambda_adapt<F>(std::forward<F>(lambda)), std::forward<E>(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

Expand Down Expand Up @@ -1161,7 +1159,6 @@ namespace xt
#endif
}

#undef XTENSOR_GCC_VERSION
#undef XTENSOR_DISABLE_LAMBDA_FCT

namespace detail
Expand Down
2 changes: 1 addition & 1 deletion include/xtensor/xutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ae52796

Please sign in to comment.