[PATCH] D58421: Add partial implementation of std::to_address() as llvm::to_address()
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 18:06:23 PST 2019
dexonsmith added inline comments.
================
Comment at: include/llvm/ADT/STLExtras.h:1589-1592
+template <class Ptr>
+typename Ptr::element_type *to_address(const Ptr &P) noexcept {
+ return P.operator->();
+}
----------------
Can you use `decltype(std::declval<Ptr>().operator->())` instead of `typename Ptr::element_type *` to avoid requiring an `element_type` typedef?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58421/new/
https://reviews.llvm.org/D58421
More information about the llvm-commits
mailing list