[libcxx-commits] [PATCH] D101638: [libc++] std::to_address mustn't depend on P::element_type.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 5 09:48:40 PDT 2021


ldionne added inline comments.


================
Comment at: libcxx/include/__memory/pointer_traits.h:206-208
+auto to_address(_Pointer&& __p) noexcept {
+    return _VSTD::__to_address(_VSTD::forward<_Pointer>(__p));
 }
----------------
Does anybody see an issue with doing this? I don't think this is detectable, so we should be conforming?


================
Comment at: libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp:70-80
+namespace P7 {
+    template<typename T> struct CanProxy;
+    template<typename T>
+    struct CanQual {
+        CanProxy<T> operator->() const { return CanProxy<T>(); }
+    };
+    template<typename T>
----------------
This is the reduction of what triggered a build breakage in Clang yesterday.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101638/new/

https://reviews.llvm.org/D101638



More information about the libcxx-commits mailing list