diff --git a/include/xtensor/xstorage.hpp b/include/xtensor/xstorage.hpp index 686cb7176..dd3feb387 100644 --- a/include/xtensor/xstorage.hpp +++ b/include/xtensor/xstorage.hpp @@ -1595,7 +1595,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 struct rebind_container> { diff --git a/include/xtensor/xutils.hpp b/include/xtensor/xutils.hpp index 85d8d1826..e90ef476c 100644 --- a/include/xtensor/xutils.hpp +++ b/include/xtensor/xutils.hpp @@ -806,7 +806,7 @@ namespace xt using type = C; }; -#if defined(__GNUC__) && __GNUC__ > 6 && !defined(__clang__) && __cplusplus >= 201703L +#ifdef __cpp_template_template_args template struct rebind_container> {