Skip to content

Commit b77cb9f

Browse files
committed
To squash
1 parent 4902b28 commit b77cb9f

2 files changed

Lines changed: 0 additions & 39 deletions

File tree

include/xtensor/containers/xfixed.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,7 @@ namespace xt
256256
using inner_backstrides_type = backstrides_type;
257257

258258
// NOTE: 0D (S::size() == 0) results in storage for 1 element (scalar)
259-
#if defined(_MSC_VER) && _MSC_VER < 1910 && !defined(_WIN64)
260-
// WORKAROUND FOR MSVC 2015 32 bit, fallback to unaligned container for 0D scalar case
261-
using storage_type = std::array<ET, detail::fixed_compute_size<S>::value>;
262-
#else
263259
using storage_type = aligned_array<ET, detail::fixed_compute_size<S>::value>;
264-
#endif
265260

266261
using reference = typename storage_type::reference;
267262
using const_reference = typename storage_type::const_reference;

include/xtensor/core/xmath.hpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,31 +1088,6 @@ namespace xt
10881088
return xfunction_type(detail::lambda_adapt<F>(std::forward<F>(lambda)), std::forward<E>(args)...);
10891089
}
10901090

1091-
// Workaround for MSVC 2015 & GCC 4.9
1092-
#if (defined(_MSC_VER) && _MSC_VER < 1910) || (defined(__GNUC__) && __GNUC__ < 5)
1093-
#define XTENSOR_DISABLE_LAMBDA_FCT
1094-
#endif
1095-
1096-
#ifdef XTENSOR_DISABLE_LAMBDA_FCT
1097-
struct square_fct
1098-
{
1099-
template <class T>
1100-
auto operator()(T x) const -> decltype(x * x)
1101-
{
1102-
return x * x;
1103-
}
1104-
};
1105-
1106-
struct cube_fct
1107-
{
1108-
template <class T>
1109-
auto operator()(T x) const -> decltype(x * x * x)
1110-
{
1111-
return x * x * x;
1112-
}
1113-
};
1114-
#endif
1115-
11161091
/**
11171092
* @ingroup pow_functions
11181093
* @brief Square power function, equivalent to e1 * e1.
@@ -1125,15 +1100,11 @@ namespace xt
11251100
template <class E1>
11261101
inline auto square(E1&& e1) noexcept
11271102
{
1128-
#ifdef XTENSOR_DISABLE_LAMBDA_FCT
1129-
return make_lambda_xfunction(square_fct{}, std::forward<E1>(e1));
1130-
#else
11311103
auto fnct = [](auto x) -> decltype(x * x)
11321104
{
11331105
return x * x;
11341106
};
11351107
return make_lambda_xfunction(std::move(fnct), std::forward<E1>(e1));
1136-
#endif
11371108
}
11381109

11391110
/**
@@ -1148,18 +1119,13 @@ namespace xt
11481119
template <class E1>
11491120
inline auto cube(E1&& e1) noexcept
11501121
{
1151-
#ifdef XTENSOR_DISABLE_LAMBDA_FCT
1152-
return make_lambda_xfunction(cube_fct{}, std::forward<E1>(e1));
1153-
#else
11541122
auto fnct = [](auto x) -> decltype(x * x * x)
11551123
{
11561124
return x * x * x;
11571125
};
11581126
return make_lambda_xfunction(std::move(fnct), std::forward<E1>(e1));
1159-
#endif
11601127
}
11611128

1162-
#undef XTENSOR_DISABLE_LAMBDA_FCT
11631129

11641130
namespace detail
11651131
{

0 commit comments

Comments
 (0)