[libcxx-commits] [clang] [libcxx] Fix vector types w.r.t. qualified element type. (PR #197624)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 22 19:23:10 PDT 2026


================
@@ -69,11 +70,11 @@ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find_vectorized(_Tp* __first, _Tp* __last,
   if (!__libcpp_is_constant_evaluated()) {
     constexpr size_t __unroll_count = 4;
     constexpr size_t __vec_size     = __native_vector_size<_Tp>;
-    using __vec                     = __simd_vector<_Tp, __vec_size>;
+    using __vec                     = __simd_vector<typename remove_cv<_Tp>::type, __vec_size>;
----------------
frederick-vs-ja wrote:

```suggestion
    using __vec                     = __simd_vector<__remove_cv_t<_Tp>, __vec_size>;
```
Ditto below.

https://github.com/llvm/llvm-project/pull/197624


More information about the libcxx-commits mailing list