================
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
 
     _LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
       _Alias __val;
-      __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+      __builtin_memcpy(&__val, static_cast<const 
void*>(std::__to_address(__base_)), sizeof(value_type));
----------------
philnik777 wrote:

Why do you think it is UB? We're only inspecting the memory of the 
non-trivially copyable type. We're not round-tripping here or anything like 
that.

https://github.com/llvm/llvm-project/pull/111434
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to