[libcxx-commits] [libcxx] [libc++] LWG3870: Remove voidify (PR #107683)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 7 03:28:28 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Danil Sidoruk (eoan-ermine)
<details>
<summary>Changes</summary>
Closes #<!-- -->105119
---
Full diff: https://github.com/llvm/llvm-project/pull/107683.diff
1 Files Affected:
- (modified) libcxx/include/__memory/voidify.h (+1-2)
``````````diff
diff --git a/libcxx/include/__memory/voidify.h b/libcxx/include/__memory/voidify.h
index dbd083bd8c1e9a..a34c10aa5315ca 100644
--- a/libcxx/include/__memory/voidify.h
+++ b/libcxx/include/__memory/voidify.h
@@ -21,8 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Tp>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void* __voidify(_Tp& __from) {
- // Cast away cv-qualifiers to allow modifying elements of a range through const iterators.
- return const_cast<void*>(static_cast<const volatile void*>(std::addressof(__from)));
+ return std::addressof(__from);
}
_LIBCPP_END_NAMESPACE_STD
``````````
</details>
https://github.com/llvm/llvm-project/pull/107683
More information about the libcxx-commits
mailing list