Skip to content
Merged

Clang19 #2833

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
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
sys:
- {compiler: clang, version: '17', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
- {compiler: clang, version: '18', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
#- {compiler: clang, version: '19', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
#- {compiler: clang, version: '20', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
- {compiler: clang, version: '19', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
- {compiler: clang, version: '20', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
- {compiler: gcc, version: '11', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
- {compiler: gcc, version: '11', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
- {compiler: gcc, version: '12', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
Expand Down
4 changes: 2 additions & 2 deletions include/xtensor/containers/xstorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1637,8 +1637,8 @@ namespace xt
return !(lhs < rhs);
}

// Workaround for rebind_container problems on GCC 8 with C++17 enabled
#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L
// Workaround for rebind_container problems when C++17 feature is enabled
#ifdef __cpp_template_template_args
template <class X, class T, std::size_t N>
struct rebind_container<X, aligned_array<T, N>>
{
Expand Down
7 changes: 3 additions & 4 deletions include/xtensor/core/xexpression_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,15 @@ namespace xt
using type = xarray<T, L>;
};

#if defined(__GNUC__) && (__GNUC__ > 6)
#if __cplusplus == 201703L
// Workaround for rebind_container problems when C++17 feature is enabled
#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>>
Expand Down
3 changes: 2 additions & 1 deletion include/xtensor/utils/xutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,8 @@ namespace xt
using type = C<X, allocator>;
};

#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L
// Workaround for rebind_container problems when C++17 feature is enabled
#ifdef __cpp_template_template_args
template <class X, class T, std::size_t N>
struct rebind_container<X, std::array<T, N>>
{
Expand Down