Skip to content

Fix is_vector_type fail while building neon with clang or GCC > 10.0 #30

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
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
19 changes: 13 additions & 6 deletions experimental/bits/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -1398,12 +1398,19 @@ template <typename _Tp, typename = void_t<>>
struct __is_vector_type : false_type {};

template <typename _Tp>
struct __is_vector_type<
_Tp, void_t<typename __vector_type<
remove_reference_t<decltype(declval<_Tp>()[0])>, sizeof(_Tp)>::type>>
: is_same<_Tp, typename __vector_type<
remove_reference_t<decltype(declval<_Tp>()[0])>,
sizeof(_Tp)>::type> {};
struct __is_vector_type<
_Tp,
enable_if_t<std::disjunction_v<
std::is_same<_Tp,
typename __vector_type<typename std::remove_reference<decltype(
std::declval<_Tp>()[0])>::type,
sizeof(_Tp)>::type>,
std::is_same<
_Tp, typename __intrinsic_type<typename std::remove_reference<decltype(
std::declval<_Tp>()[0])>::type,
sizeof(_Tp)>::type>>>> : true_type
{
};

template <typename _Tp>
inline constexpr bool __is_vector_type_v = __is_vector_type<_Tp>::value;
Expand Down