From 9c6d43f5d45711ee5ad08066d70917b6d4fe5ee5 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 18 Jun 2025 14:36:54 -0700 Subject: [PATCH] Remove out-of-line definition of constexpr static data members Fixes, eg ``` xsimd/types/xsimd_batch.hpp:284:45: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated-redundant-constexpr-static-def] 284 | constexpr std::size_t batch_bool::size; | ^ ``` --- include/xsimd/types/xsimd_batch.hpp | 9 --------- include/xsimd/types/xsimd_traits.hpp | 12 ------------ 2 files changed, 21 deletions(-) diff --git a/include/xsimd/types/xsimd_batch.hpp b/include/xsimd/types/xsimd_batch.hpp index b54d84aae..c4c9179de 100644 --- a/include/xsimd/types/xsimd_batch.hpp +++ b/include/xsimd/types/xsimd_batch.hpp @@ -271,9 +271,6 @@ namespace xsimd XSIMD_INLINE batch logical_or(batch const& other) const noexcept; }; - template - constexpr std::size_t batch::size; - /** * @brief batch of predicate over scalar or complex values. * @@ -344,9 +341,6 @@ namespace xsimd static XSIMD_INLINE register_type make_register(detail::index_sequence<>, V... v) noexcept; }; - template - constexpr std::size_t batch_bool::size; - /** * @brief batch of complex values. * @@ -476,9 +470,6 @@ namespace xsimd real_batch m_imag; }; - template - constexpr std::size_t batch, A>::size; - #ifdef XSIMD_ENABLE_XTL_COMPLEX template struct batch, A> diff --git a/include/xsimd/types/xsimd_traits.hpp b/include/xsimd/types/xsimd_traits.hpp index 0d5565b78..13d3c1da8 100644 --- a/include/xsimd/types/xsimd_traits.hpp +++ b/include/xsimd/types/xsimd_traits.hpp @@ -53,9 +53,6 @@ namespace xsimd static constexpr size_t size = 1; }; - template - constexpr size_t simd_traits_impl::size; - template struct simd_traits_impl { @@ -64,9 +61,6 @@ namespace xsimd static constexpr size_t size = type::size; }; - template - constexpr size_t simd_traits_impl::size; - template struct static_check_supported_config_emitter { @@ -128,9 +122,6 @@ namespace xsimd static constexpr size_t size = simd_traits::size; }; - template - constexpr size_t revert_simd_traits::size; - template struct revert_simd_traits> { @@ -138,9 +129,6 @@ namespace xsimd static constexpr size_t size = batch::size; }; - template - constexpr size_t revert_simd_traits>::size; - template using simd_type = typename simd_traits::type;