[libcxx-commits] [libcxx] WIP [libc++] LWG3870: Remove `voidify` (PR #78546)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 17 23:39:09 PST 2024
https://github.com/H-G-Hristov created https://github.com/llvm/llvm-project/pull/78546
Implements: https://wg21.link/LWG3870
- https://eel.is/c++draft/specialized.algorithms
>From bd57f719daf2024f7b02df4da699ef130b0d4fe0 Mon Sep 17 00:00:00 2001
From: Zingam <zingam at outlook.com>
Date: Thu, 11 Jan 2024 09:53:45 +0200
Subject: [PATCH] [libc++] LWG3870: Remove `voidify`
Implements: https://wg21.link/LWG3870
- https://eel.is/c++draft/specialized.algorithms
---
libcxx/docs/Status/Cxx23Issues.csv | 2 +-
libcxx/include/__memory/voidify.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv
index b24ecc5525a149..b3f5af86954613 100644
--- a/libcxx/docs/Status/Cxx23Issues.csv
+++ b/libcxx/docs/Status/Cxx23Issues.csv
@@ -296,7 +296,7 @@
"`3862 <https://wg21.link/LWG3862>`__","``basic_const_iterator``'s ``common_type`` specialization is underconstrained","February 2023","","",""
"`3865 <https://wg21.link/LWG3865>`__","Sorting a range of ``pairs``","February 2023","|Complete|","17.0","|ranges|"
"`3869 <https://wg21.link/LWG3869>`__","Deprecate ``std::errc`` constants related to UNIX STREAMS","February 2023","","",""
-"`3870 <https://wg21.link/LWG3870>`__","Remove ``voidify``","February 2023","","",""
+"`3870 <https://wg21.link/LWG3870>`__","Remove ``voidify``","February 2023","|Complete|","18.0",""
"`3871 <https://wg21.link/LWG3871>`__","Adjust note about ``terminate``","February 2023","","",""
"`3872 <https://wg21.link/LWG3872>`__","``basic_const_iterator`` should have custom ``iter_move``","February 2023","","",""
"`3875 <https://wg21.link/LWG3875>`__","``std::ranges::repeat_view<T, IntegerClass>::iterator`` may be ill-formed","February 2023","|Complete|","17.0","|ranges|"
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
More information about the libcxx-commits
mailing list