[libc++] Revert the std::to_address change to avoid relying on element_type.
This reverts commit da456167, which broke the Clang build. I'm able to
reproduce it but I want to give myself a bit more time to investigate.
Differential Revision: https://reviews.llvm.org/D101638
NOKEYCHECK=True
GitOrigin-RevId: 347f69c55f45acd80070f522bed7417d402f84b0
diff --git a/include/iterator b/include/iterator
index 95a39e7..97677fe 100644
--- a/include/iterator
+++ b/include/iterator
@@ -1352,7 +1352,7 @@
_LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this),
"Attempted to dereference a non-dereferenceable iterator");
#endif
- return _VSTD::__to_address(__i);
+ return (pointer)_VSTD::addressof(*__i);
}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator++() _NOEXCEPT
{