From 431a18bdb740b45937fd16c754a2d2cdfb53fbd3 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 15 Sep 2025 10:36:54 -0700 Subject: [PATCH] Remove deprecated constexpr definitions --- include/xtensor/containers/xfixed.hpp | 30 ------------------------- include/xtensor/containers/xstorage.hpp | 5 ----- include/xtensor/core/xfunction.hpp | 12 ---------- 3 files changed, 47 deletions(-) diff --git a/include/xtensor/containers/xfixed.hpp b/include/xtensor/containers/xfixed.hpp index 4ab3a75c3..6ac029881 100644 --- a/include/xtensor/containers/xfixed.hpp +++ b/include/xtensor/containers/xfixed.hpp @@ -381,21 +381,6 @@ namespace xt friend class xcontainer>; }; -#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED - // Out of line definitions to prevent linker errors prior to C++17 - template - constexpr - typename xfixed_container::inner_shape_type xfixed_container::m_shape; - - template - constexpr - typename xfixed_container::inner_strides_type xfixed_container::m_strides; - - template - constexpr typename xfixed_container::inner_backstrides_type - xfixed_container::m_backstrides; -#endif - /**************************************** * xfixed_container_adaptor declaration * ****************************************/ @@ -518,21 +503,6 @@ namespace xt friend class xcontainer>; }; -#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED - // Out of line definitions to prevent linker errors prior to C++17 - template - constexpr - typename xfixed_adaptor::inner_shape_type xfixed_adaptor::m_shape; - - template - constexpr - typename xfixed_adaptor::inner_strides_type xfixed_adaptor::m_strides; - - template - constexpr typename xfixed_adaptor::inner_backstrides_type - xfixed_adaptor::m_backstrides; -#endif - /************************************ * xfixed_container implementation * ************************************/ diff --git a/include/xtensor/containers/xstorage.hpp b/include/xtensor/containers/xstorage.hpp index 28ad238e5..811ab80b7 100644 --- a/include/xtensor/containers/xstorage.hpp +++ b/include/xtensor/containers/xstorage.hpp @@ -1731,11 +1731,6 @@ namespace xt XTENSOR_CONSTEXPR_ENHANCED_STATIC cast_type m_array = cast_type({X...}); }; -#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED - template - constexpr typename fixed_shape::cast_type fixed_shape::m_array; -#endif - #undef XTENSOR_FIXED_SHAPE_CONSTEXPR template diff --git a/include/xtensor/core/xfunction.hpp b/include/xtensor/core/xfunction.hpp index 65ee5050e..8f85892fb 100644 --- a/include/xtensor/core/xfunction.hpp +++ b/include/xtensor/core/xfunction.hpp @@ -67,18 +67,6 @@ namespace xt XTENSOR_CONSTEXPR_ENHANCED_STATIC bool is_initialized = true; }; -#ifdef XTENSOR_HAS_CONSTEXPR_ENHANCED - // Out of line definitions to prevent linker errors prior to C++17 - template - constexpr fixed_shape xfunction_cache_impl, is_shape_trivial>::shape; - - template - constexpr bool xfunction_cache_impl, is_shape_trivial>::is_trivial; - - template - constexpr bool xfunction_cache_impl, is_shape_trivial>::is_initialized; -#endif - template struct xfunction_bool_load_type {