[libcxx-commits] [PATCH] D144363: [libcxx] <experimental/simd> Added simd width functions, simd_size traits and related tests
Yin Zhang via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 12 21:50:11 PDT 2023
Joy12138 added a comment.
In D144363#4491370 <https://reviews.llvm.org/D144363#4491370>, @philnik wrote:
> I think you did something wrong. You shouldn't need a `.verify.cpp` for SFINAE testing, and looking at the error message the types don't SFINAE away.
>
> Something like
>
> template <class T, class U, class = void>
> struct check_sfinae : false_type {};
>
> template <class T, class U>
> struct check_sfinae<void_t<ex::simd_size<T, U>>> : true_type {};
>
> static_assert(!check_sfinae<int , ex::native_simd<int>>::value);
>
> should work just fine in a normal `.pass.cpp`. If you get an error, either I did something wrong in the SFINAE test, or the implementation of `ex::simd_size` is wrong (because it doesn't SFINAE away).
>
> I'm pretty sure that variable templates can't SFINAE away.
@philnik Hi, we rewrite the SFINAE test as you given style. It seems no errors come out. Does it mean our implementations right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144363/new/
https://reviews.llvm.org/D144363
More information about the libcxx-commits
mailing list