clang19_build.patch 1.9 KB

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