[libcxx-commits] [PATCH] D156225: [libcxx] <experimental/simd> Add broadcast constructor of class simd/simd_mask
Yin Zhang via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 7 21:05:37 PDT 2023
Joy12138 marked 3 inline comments as done.
Joy12138 added inline comments.
================
Comment at: libcxx/include/experimental/__simd/utility.h:60-65
+template <typename __From, typename __To, typename = void>
+struct __is_value_preserving_convertible : std::false_type {};
+
+template <typename __From, typename __To>
+struct __is_value_preserving_convertible<__From, __To, decltype(static_cast<__To>(std::declval<__From>()))>
+ : std::true_type {};
----------------
philnik wrote:
> Isn't this just `is_constructible<__To, __From>`?
I'm not sure if the current implementation is the same as `is_constructible`.
I am also not sure if either of them can meet the requirements of the document: "every possible value of `From` can be represented with type `To`".
Do you have any suggestion?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156225/new/
https://reviews.llvm.org/D156225
More information about the libcxx-commits
mailing list