|
| 1 | +diff --git a/include/xtensor/xexpression_traits.hpp b/include/xtensor/xexpression_traits.hpp |
| 2 | +index 205de67a..61f6620b 100644 |
| 3 | +--- a/include/xtensor/xexpression_traits.hpp |
| 4 | ++++ b/include/xtensor/xexpression_traits.hpp |
| 5 | +@@ -103,16 +103,14 @@ namespace xt |
| 6 | + using type = xarray<T, L>; |
| 7 | + }; |
| 8 | + |
| 9 | +-#if defined(__GNUC__) && (__GNUC__ > 6) |
| 10 | +-#if __cplusplus == 201703L |
| 11 | ++#ifdef __cpp_template_template_args |
| 12 | + template <template <class, std::size_t, class, bool> class S, class X, std::size_t N, class A, bool Init> |
| 13 | + struct xtype_for_shape<S<X, N, A, Init>> |
| 14 | + { |
| 15 | + template <class T, layout_type L> |
| 16 | + using type = xarray<T, L>; |
| 17 | + }; |
| 18 | +-#endif // __cplusplus == 201703L |
| 19 | +-#endif // __GNUC__ && (__GNUC__ > 6) |
| 20 | ++#endif // __cpp_template_template_args |
| 21 | + |
| 22 | + template <template <class, std::size_t> class S, class X, std::size_t N> |
| 23 | + struct xtype_for_shape<S<X, N>> |
| 24 | +diff --git a/include/xtensor/xstorage.hpp b/include/xtensor/xstorage.hpp |
| 25 | +index ac179a85..39fb21c6 100644 |
| 26 | +--- a/include/xtensor/xstorage.hpp |
| 27 | ++++ b/include/xtensor/xstorage.hpp |
| 28 | +@@ -1638,7 +1638,7 @@ namespace xt |
| 29 | + } |
| 30 | + |
| 31 | + // Workaround for rebind_container problems on GCC 8 with C++17 enabled |
| 32 | +-#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L |
| 33 | ++#ifdef __cpp_template_template_args |
| 34 | + template <class X, class T, std::size_t N> |
| 35 | + struct rebind_container<X, aligned_array<T, N>> |
| 36 | + { |
| 37 | +diff --git a/include/xtensor/xutils.hpp b/include/xtensor/xutils.hpp |
| 38 | +index 137d0e70..d718bdce 100644 |
| 39 | +--- a/include/xtensor/xutils.hpp |
| 40 | ++++ b/include/xtensor/xutils.hpp |
| 41 | +@@ -872,7 +872,7 @@ namespace xt |
| 42 | + using type = C<X, allocator>; |
| 43 | + }; |
| 44 | + |
| 45 | +-#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L |
| 46 | ++#ifdef __cpp_template_template_args |
| 47 | + template <class X, class T, std::size_t N> |
| 48 | + struct rebind_container<X, std::array<T, N>> |
| 49 | + { |
0 commit comments