Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions packages/x/xtensor/patches/0.25.0/clang19_build.patch
Original file line number Diff line number Diff line change
@@ -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>>
{
2 changes: 2 additions & 0 deletions packages/x/xtensor/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ package("xtensor")
add_versions("0.24.0", "37738aa0865350b39f048e638735c05d78b5331073b6329693e8b8f0902df713")
add_versions("0.23.10", "2e770a6d636962eedc868fef4930b919e26efe783cd5d8732c11e14cf72d871c")

add_patches("0.25.0", "patches/0.25.0/clang19_build.patch", "b40ef789b39dad40d8f97b73793a5d0377e6165f99a49a8fddde45ff66ed87a2")

add_configs("simd", {description = "Enable SIMD acceleration ", default = true, type = "boolean"})
add_configs("tbb", {description = "Enable parallelization using intel TBB", default = false, type = "boolean"})
add_configs("openmp", {description = "Enable parallelization using OpenMP", default = false, type = "boolean"})
Expand Down
Loading