[libcxx-commits] [PATCH] D91201: [libc++] LWG2070: Use Allocator construction for objects created with allocate_shared

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 17 14:52:36 PST 2020


ldionne added inline comments.


================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_construct.pass.cpp:28
+static bool destroy_called = false;
+static unsigned allocator_id = 0;
+
----------------
zoecarver wrote:
> In either patch, it would probably be a good idea to move these into `MyAllocator` so we can make sure that the correct specialization is setting them. 
I don't think we can, because the allocator is going to be rebound to allocate an unknown object (ie the shared pointer control block).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91201



More information about the libcxx-commits mailing list