[libcxx-commits] [PATCH] D109331: [libc++] Fix std::to_address(arr)

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 6 17:54:52 PDT 2021


Quuxplusone updated this revision to Diff 370977.
Quuxplusone edited the summary of this revision.
Quuxplusone added a comment.

Disable the `const _Ptr&` overload for function types, as well as array types. Turns out we already got the nice error message for `std::to_address(f)`, but we would give the ugly `__pointer_traits_element_type` spew if you did `std::__to_address(f)`. This is now fixed, and put a test on it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109331

Files:
  libcxx/include/__memory/pointer_traits.h
  libcxx/test/libcxx/utilities/memory/pointer.conversion/to_address.pass.cpp
  libcxx/test/libcxx/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp
  libcxx/test/libcxx/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp
  libcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp
  libcxx/test/std/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp
  libcxx/test/std/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109331.370977.patch
Type: text/x-patch
Size: 6436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210907/e84b8216/attachment-0001.bin>


More information about the libcxx-commits mailing list