[libcxx-commits] [PATCH] D81412: [libcxx] Fix LWG 2876: shared_ptr::shared_ptr(const weak_ptr<Y>&) constructor should be constrained.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 9 08:46:06 PDT 2020


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

Can we add tests for these constructors with incompatible `Yp`s too?



================
Comment at: libcxx/include/memory:4533
+#if _LIBCPP_STD_VER > 14
+    typedef remove_extent_t<_Tp> element_type;
+#else
----------------
I'm not seeing this change as part of LWG 2876.

Where does that come from? If we don't have proper support for array types in `weak_ptr`, we should add it separately (with tests too), not as part of fixing this simple LWG issue.


================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp:85
 
+#if STD_TEST_VERSION > 14
+    {
----------------
`STD_TEST_VERSION` doesn't exist either. Please see my comment in another patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81412





More information about the libcxx-commits mailing list