[libcxx-commits] [libcxx] [libc++] <experimental/simd> Add implicit type conversion constructor for class simd/simd_mask (PR #71132)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 16 22:42:44 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 865c1fda6f3e258b47a4f7992bb19ca2e9edcfa1 b601f1609dc72c95a0b91092b07ada0070747afa -- libcxx/test/std/experimental/simd/simd.class/simd_ctor_conversion.pass.cpp libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_conversion.pass.cpp libcxx/include/experimental/__simd/simd.h libcxx/include/experimental/__simd/simd_mask.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/experimental/__simd/simd.h b/libcxx/include/experimental/__simd/simd.h
index 15df0d6670..08088ee5a4 100644
--- a/libcxx/include/experimental/__simd/simd.h
+++ b/libcxx/include/experimental/__simd/simd.h
@@ -49,7 +49,8 @@ public:
// implicit type conversion constructor
template <class _Up,
enable_if_t<!is_same_v<_Up, _Tp> && is_same_v<abi_type, simd_abi::fixed_size<size()>> &&
- __is_non_narrowing_convertible_v<_Up, value_type>, int> = 0>
+ __is_non_narrowing_convertible_v<_Up, value_type>,
+ int> = 0>
_LIBCPP_HIDE_FROM_ABI simd(const simd<_Up, simd_abi::fixed_size<size()>>& __v) noexcept {
for (size_t __i = 0; __i < size(); __i++) {
(*this)[__i] = static_cast<value_type>(__v[__i]);
``````````
</details>
https://github.com/llvm/llvm-project/pull/71132
More information about the libcxx-commits
mailing list