[libcxx-commits] [PATCH] D69132: [libc++][P0784] Marked the default allocator constexpr.

Michael Park via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 14 08:41:27 PST 2020


mpark marked 5 inline comments as done.
mpark added inline comments.


================
Comment at: libcxx/include/memory:1957
+    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCPP_CONSTEXPR_AFTER_CXX17_WITH_CONSTEXPR_DYNAMIC_ALLOC
+    void destroy(pointer __p) {__p->~_Tp();}
----------------
ldionne wrote:
> This is because `__cpp_constexpr_dynamic_alloc` also controls whether you can call a destructor explicitly inside `constexpr`, right? It looks kind of funny, because we don't allocate here.
> 
> **EDIT**: I guess the same hold for `construct`, where we use placement-new.
Yep, that's also correct.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69132





More information about the libcxx-commits mailing list