diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3de9fe91c..91d65b5ba 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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} diff --git a/include/xtensor/containers/xstorage.hpp b/include/xtensor/containers/xstorage.hpp index 46318c259..a3185259a 100644 --- a/include/xtensor/containers/xstorage.hpp +++ b/include/xtensor/containers/xstorage.hpp @@ -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 struct rebind_container> { diff --git a/include/xtensor/core/xexpression_traits.hpp b/include/xtensor/core/xexpression_traits.hpp index 4328e54fb..5ec0f86fe 100644 --- a/include/xtensor/core/xexpression_traits.hpp +++ b/include/xtensor/core/xexpression_traits.hpp @@ -103,16 +103,15 @@ namespace xt using type = xarray; }; -#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