Skip to content

Commit 812a599

Browse files
committed
Avoid warnings in compiler version checks
1 parent d9c3782 commit 812a599

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

include/xtensor/xmath.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,10 +1087,8 @@ namespace xt
10871087
return xfunction_type(detail::lambda_adapt<F>(std::forward<F>(lambda)), std::forward<E>(args)...);
10881088
}
10891089

1090-
#define XTENSOR_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
1091-
10921090
// Workaround for MSVC 2015 & GCC 4.9
1093-
#if (defined(_MSC_VER) && _MSC_VER < 1910) || (defined(__GNUC__) && GCC_VERSION < 49999)
1091+
#if (defined(_MSC_VER) && _MSC_VER < 1910) || (defined(__GNUC__) && __GNUC__ < 5)
10941092
#define XTENSOR_DISABLE_LAMBDA_FCT
10951093
#endif
10961094

@@ -1160,7 +1158,6 @@ namespace xt
11601158
#endif
11611159
}
11621160

1163-
#undef XTENSOR_GCC_VERSION
11641161
#undef XTENSOR_DISABLE_LAMBDA_FCT
11651162

11661163
namespace detail

include/xtensor/xutils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "xtensor_config.hpp"
3232

33-
#if (_MSC_VER >= 1910)
33+
#if (defined(_MSC_VER) && _MSC_VER >= 1910)
3434
#define NOEXCEPT(T)
3535
#else
3636
#define NOEXCEPT(T) noexcept(T)

0 commit comments

Comments
 (0)