[libcxx-commits] [PATCH] D112048: [libc++] [test] Add tests for converting array types in shared_ptr.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 19 10:01:40 PDT 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Awesome, thanks for adding these tests!



================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp:100
         {
-            std::shared_ptr<B> pB(pA);
+            std::shared_ptr<B> pB(std::move(pA));
             assert(B::count == 0);
----------------
For lurkers: this was most likely an oversight in the original test, since we mean to test the move constructor, not the copy constructor. @var-const told me offline, cause I was puzzled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112048



More information about the libcxx-commits mailing list