[PATCH] D30837: [libcxx] Support for shared_ptr<T()>

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 12 22:22:15 PDT 2017


EricWF added a comment.

- Please apply this patch <https://gist.github.com/EricWF/c4a5fd77b4a4ff6c176a74c7cbdf5482> on top of yours. It adds tests for the diagnostics produced when the default deleter is used.

LGTM other than the inline comments. I'll want to run this by @mclow.lists before giving it gets committed though.



================
Comment at: include/memory:3606
+template <>
+class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type>
+{
----------------
I would prefer using an entirely different allocator type, not a specialization of `std::allocator`. 

Re-naming this class to `__shared_ptr_dummy_rebind_allocator` and moving it closer to `__shared_ptr_default_allocator` would be  good.


https://reviews.llvm.org/D30837





More information about the cfe-commits mailing list