|
|
@@ -0,0 +1,49 @@
|
|
|
+diff --git a/include/xtensor/xexpression_traits.hpp b/include/xtensor/xexpression_traits.hpp
|
|
|
+index 205de67a..61f6620b 100644
|
|
|
+--- a/include/xtensor/xexpression_traits.hpp
|
|
|
++++ b/include/xtensor/xexpression_traits.hpp
|
|
|
+@@ -103,16 +103,14 @@ namespace xt
|
|
|
+ using type = xarray<T, L>;
|
|
|
+ };
|
|
|
+
|
|
|
+-#if defined(__GNUC__) && (__GNUC__ > 6)
|
|
|
+-#if __cplusplus == 201703L
|
|
|
++#ifdef __cpp_template_template_args
|
|
|
+ template <template <class, std::size_t, class, bool> class S, class X, std::size_t N, class A, bool Init>
|
|
|
+ struct xtype_for_shape<S<X, N, A, Init>>
|
|
|
+ {
|
|
|
+ template <class T, layout_type L>
|
|
|
+ using type = xarray<T, L>;
|
|
|
+ };
|
|
|
+-#endif // __cplusplus == 201703L
|
|
|
+-#endif // __GNUC__ && (__GNUC__ > 6)
|
|
|
++#endif // __cpp_template_template_args
|
|
|
+
|
|
|
+ template <template <class, std::size_t> class S, class X, std::size_t N>
|
|
|
+ struct xtype_for_shape<S<X, N>>
|
|
|
+diff --git a/include/xtensor/xstorage.hpp b/include/xtensor/xstorage.hpp
|
|
|
+index ac179a85..39fb21c6 100644
|
|
|
+--- a/include/xtensor/xstorage.hpp
|
|
|
++++ b/include/xtensor/xstorage.hpp
|
|
|
+@@ -1638,7 +1638,7 @@ namespace xt
|
|
|
+ }
|
|
|
+
|
|
|
+ // Workaround for rebind_container problems on GCC 8 with C++17 enabled
|
|
|
+-#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L
|
|
|
++#ifdef __cpp_template_template_args
|
|
|
+ template <class X, class T, std::size_t N>
|
|
|
+ struct rebind_container<X, aligned_array<T, N>>
|
|
|
+ {
|
|
|
+diff --git a/include/xtensor/xutils.hpp b/include/xtensor/xutils.hpp
|
|
|
+index 137d0e70..d718bdce 100644
|
|
|
+--- a/include/xtensor/xutils.hpp
|
|
|
++++ b/include/xtensor/xutils.hpp
|
|
|
+@@ -872,7 +872,7 @@ namespace xt
|
|
|
+ using type = C<X, allocator>;
|
|
|
+ };
|
|
|
+
|
|
|
+-#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L
|
|
|
++#ifdef __cpp_template_template_args
|
|
|
+ template <class X, class T, std::size_t N>
|
|
|
+ struct rebind_container<X, std::array<T, N>>
|
|
|
+ {
|