[libcxx-commits] [PATCH] D80882: [libcxx] Allow shared_ptr's unique_ptr converting constructor to support array types.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 8 11:45:46 PDT 2021


ldionne added inline comments.


================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp:131
+      A* raw_ptr = ptr.get();
+      std::shared_ptr<B> p = std::move(ptr);
+      assert(A::count == 8);
----------------
This is not testing `operator=`, this is testing initialization!


================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp:13
 
 // template <class Y, class D> explicit shared_ptr(unique_ptr<Y, D>&&r);
 
----------------
Hmm, this shouldn't be `explicit`. It looks like the implementation is OK, only this comment is wrong. Can you fix as a fly-by?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80882



More information about the libcxx-commits mailing list