Skip to content

Remove out-of-line definition of constexpr static data members #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 0 additions & 9 deletions include/xsimd/types/xsimd_batch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,6 @@ namespace xsimd
XSIMD_INLINE batch logical_or(batch const& other) const noexcept;
};

template <class T, class A>
constexpr std::size_t batch<T, A>::size;

/**
* @brief batch of predicate over scalar or complex values.
*
Expand Down Expand Up @@ -344,9 +341,6 @@ namespace xsimd
static XSIMD_INLINE register_type make_register(detail::index_sequence<>, V... v) noexcept;
};

template <class T, class A>
constexpr std::size_t batch_bool<T, A>::size;

/**
* @brief batch of complex values.
*
Expand Down Expand Up @@ -476,9 +470,6 @@ namespace xsimd
real_batch m_imag;
};

template <class T, class A>
constexpr std::size_t batch<std::complex<T>, A>::size;

#ifdef XSIMD_ENABLE_XTL_COMPLEX
template <typename T, bool i3ec, typename A>
struct batch<xtl::xcomplex<T, T, i3ec>, A>
Expand Down
12 changes: 0 additions & 12 deletions include/xsimd/types/xsimd_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ namespace xsimd
static constexpr size_t size = 1;
};

template <class T>
constexpr size_t simd_traits_impl<T, false>::size;

template <class T>
struct simd_traits_impl<T, true>
{
Expand All @@ -64,9 +61,6 @@ namespace xsimd
static constexpr size_t size = type::size;
};

template <class T>
constexpr size_t simd_traits_impl<T, true>::size;

template <class T, class A>
struct static_check_supported_config_emitter
{
Expand Down Expand Up @@ -128,19 +122,13 @@ namespace xsimd
static constexpr size_t size = simd_traits<type>::size;
};

template <class T>
constexpr size_t revert_simd_traits<T>::size;

template <class T>
struct revert_simd_traits<batch<T>>
{
using type = T;
static constexpr size_t size = batch<T>::size;
};

template <class T>
constexpr size_t revert_simd_traits<batch<T>>::size;

template <class T>
using simd_type = typename simd_traits<T>::type;

Expand Down