diff --git a/include/xtensor/xassign.hpp b/include/xtensor/xassign.hpp index 2ec698ae6..703634c2f 100644 --- a/include/xtensor/xassign.hpp +++ b/include/xtensor/xassign.hpp @@ -456,6 +456,8 @@ namespace xt constexpr bool simd_strided_assign = traits::simd_strided_assign(); if (linear_assign) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wduplicated-branches" if (simd_linear_assign || traits::simd_linear_assign(de1, de2)) { // Do not use linear_assigner here since it will make the compiler @@ -469,6 +471,7 @@ namespace xt { linear_assigner::run(de1, de2); } +#pragma GCC diagnostic pop } else if (simd_strided_assign) { diff --git a/include/xtensor/xfixed.hpp b/include/xtensor/xfixed.hpp index c6ba964ed..36e9910d3 100644 --- a/include/xtensor/xfixed.hpp +++ b/include/xtensor/xfixed.hpp @@ -153,7 +153,7 @@ namespace xt (L == layout_type::row_major) || (L == layout_type::column_major), "Layout not supported for fixed array" ); -#if (_MSC_VER >= 1910) +#if (defined(_MSC_VER_) && _MSC_VER >= 1910) using temp_type = std::index_sequence; return R({workaround::get_computed_strides(shape[I] == 1)...}); #else diff --git a/include/xtensor/xsort.hpp b/include/xtensor/xsort.hpp index 95591a798..a539c7dc9 100644 --- a/include/xtensor/xsort.hpp +++ b/include/xtensor/xsort.hpp @@ -1242,7 +1242,6 @@ namespace xt template inline auto argmin(const xexpression& e) { - using value_type = typename E::value_type; auto&& ed = eval(e.derived_cast()); auto begin = ed.template begin(); auto end = ed.template end(); @@ -1272,7 +1271,6 @@ namespace xt template inline auto argmax(const xexpression& e) { - using value_type = typename E::value_type; auto&& ed = eval(e.derived_cast()); auto begin = ed.template begin(); auto end = ed.template end();