Skip to content

Commit 4902b28

Browse files
committed
Removed workaround for old Windows compiler
1 parent ff10a85 commit 4902b28

3 files changed

Lines changed: 4 additions & 18 deletions

File tree

include/xtensor/containers/xstorage.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,9 @@ namespace xt
649649
using reverse_iterator = std::reverse_iterator<iterator>;
650650
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
651651

652-
#if defined(_MSC_VER) && _MSC_VER < 1910
653-
static constexpr std::size_t alignment = detail::allocator_alignment<A>::value;
654-
#else
655652
static constexpr std::size_t alignment = detail::allocator_alignment<A>::value != 0
656653
? detail::allocator_alignment<A>::value
657654
: alignof(T);
658-
#endif
659655

660656
svector() noexcept;
661657
~svector();

include/xtensor/utils/xutils.hpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828

2929
#include "../core/xtensor_config.hpp"
3030

31-
#if (defined(_MSC_VER) && _MSC_VER >= 1910)
32-
#define NOEXCEPT(T)
33-
#else
34-
#define NOEXCEPT(T) noexcept(T)
35-
#endif
36-
3731
namespace xt
3832
{
3933
/****************
@@ -53,7 +47,7 @@ namespace xt
5347
constexpr decltype(auto) argument(Args&&... args) noexcept;
5448

5549
template <class R, class F, class... S>
56-
R apply(std::size_t index, F&& func, const std::tuple<S...>& s) NOEXCEPT(noexcept(func(std::get<0>(s))));
50+
R apply(std::size_t index, F&& func, const std::tuple<S...>& s) noexcept(noexcept(func(std::get<0>(s))));
5751

5852
template <class T, class S>
5953
void nested_copy(T&& iter, const S& s);
@@ -198,7 +192,7 @@ namespace xt
198192
* accumulate implementation *
199193
*****************************/
200194

201-
/// @cond DOXYGEN_INCLUDE_NOEXCEPT
195+
/// @cond DOXYGEN_INCLUDE_noexcept
202196

203197
namespace detail
204198
{
@@ -266,8 +260,8 @@ namespace xt
266260
************************/
267261

268262
template <class R, class F, class... S>
269-
inline R apply(std::size_t index, F&& func, const std::tuple<S...>& s)
270-
NOEXCEPT(noexcept(func(std::get<0>(s))))
263+
inline return
264+
apply(std::size_t index, F&& func, const std::tuple<S...>& s) noexcept(noexcept(func(std::get<0>(s))))
271265
{
272266
XTENSOR_ASSERT(sizeof...(S) > index);
273267
return std::apply(

test/test_xutils.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,7 @@ namespace xt
113113
return i;
114114
};
115115
auto t = std::make_tuple(1, 2, 3);
116-
#if (_MSC_VER >= 1910)
117-
static_assert(!noexcept(apply<int>(1, func_ne, t)));
118-
#else
119116
static_assert(noexcept(apply<int>(1, func_ne, t)));
120-
#endif
121117
}
122118

123119
TEST(utils, conditional_cast)

0 commit comments

Comments
 (0)