[libcxx-commits] [PATCH] D57403: Extending make_shared to Support Arrays (Partially) - P0674R1

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 4 20:02:05 PST 2019


zoecarver marked 4 inline comments as done.
zoecarver added inline comments.


================
Comment at: include/memory:4358
+    // XXX is it okay to delete the line below? It seems like it is only checking if _Tp is an array.
+    // static_assert( is_constructible<_Tp, _Args...>::value, "Can't construct object in allocate_shared" );
     typedef __shared_ptr_emplace<_Tp, _Alloc> _CntrlBlk;
----------------
mclow.lists wrote:
> It's checking to see if you can construct a `_Tp` from that list of arguments.
hmm -- just went back and enabled this, seemed to be fine. Not sure why I disabled it in the first place ¯\_(ツ)_/¯


================
Comment at: test/libcxx/memory/shared_ptr_array.pass.cpp:28
+    assert(typeid(**bar) == typeid(T) && "Type is not the same");
+}
+
----------------
mclow.lists wrote:
> I think you want to test that 64 constructors got called, and (afterwards) that 64 destructors got called.
> 
Good idea, is there a macro for this or something?


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

https://reviews.llvm.org/D57403





More information about the libcxx-commits mailing list