Closed Bug 1710145 Opened 4 years ago Closed 4 years ago

Support CTAD with RefPtr from already_AddRefed

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mccr8, Assigned: mozbugz)

References

Details

Attachments

(1 file)

This does not work: RefPtr foo = GetFoo();, where GetFoo() returns an already_AddRefed. Apparently we can add something or other so it'll work.

In a review comment in my patch for bug 1709715, kmag said "I think we need to either just remove the is_convertible_v guards in the constructors and let them just fail the conversion normally, or add deduction guides so it works with the current constructors."

Assignee: nobody → gsquelart
Status: NEW → ASSIGNED
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/10151fddafaf Deduction guide RefPtr(already_AddRefed<T>) -> RefPtr<T> - r=kmag
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: