This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by EricWF on Jun 8 2020, 10:48 AM.

Details

Reviewers
ldionne
zoecarver
Group Reviewers
Restricted Project
Summary

Fixes LWG 2876 and some issues with array types in weak_ptr.

Diff Detail

Event Timeline

zoecarver created this revision.Jun 8 2020, 10:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2020, 10:48 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

I'm going to add a more comprehensive patch to fully support array types in weak_ptr later this week.

zoecarver updated this revision to Diff 269289.Jun 8 2020, 10:50 AM
  • Update 1z satus
ldionne requested changes to this revision.Jun 9 2020, 8:16 AM

Can we add tests for these constructors with incompatible Yps too?

libcxx/include/memory
4533

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.

libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/weak_ptr.pass.cpp
85

STD_TEST_VERSION doesn't exist either. Please see my comment in another patch.

This revision now requires changes to proceed.Jun 9 2020, 8:16 AM
zoecarver planned changes to this revision.Jun 9 2020, 10:01 PM

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.

I was hoping to put together a patch for this today but I didn't have time. I should be able to implement this tomorrow or sometime later this week. We should put this patch on hold until that's done.

EricWF commandeered this revision.Sep 14 2023, 1:36 PM
EricWF added a reviewer: zoecarver.
EricWF added a subscriber: EricWF.

This was completed. Closing.

Herald added a project: Restricted Project. · View Herald TranscriptSep 14 2023, 1:36 PM
EricWF abandoned this revision.Sep 14 2023, 1:36 PM