Closed Bug 1329513 Opened 5 years ago Closed 5 years ago

Add RemoveRawOrSmartPointer<T> to remove raw and smart pointers from their contained type

Categories

(Core :: XPCOM, defect)

49 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: gerald, Assigned: gerald)

References

Details

Attachments

(1 file)

Basically, a combination of RemovePointer<T> and RemoveSmartPointer<T>.
Comment on attachment 8824832 [details]
Bug 1329513 - RemoveRawOrSmartPointerHelper to extract T from T*, RefPtr<T>, and nsCOMPtr<T> -

https://reviewboard.mozilla.org/r/103106/#review103894

`static_assert`-style tests for this would be splendid. :)
Attachment #8824832 - Flags: review?(nfroyd) → review+
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2df2cb2dd088
RemoveRawOrSmartPointerHelper to extract T from T*, RefPtr<T>, and nsCOMPtr<T> - r=froydnj
Renamed 'RemoveAnyPointer' to 'RemoveRawOrSmartPointer', as I didn't want to give the wrong impression that it could remove other types of smart pointers like UniquePtr.
Summary: Add RemoveAnyPointer<T> to remove raw and smart pointers from their contained type → Add RemoveRawOrSmartPointer<T> to remove raw and smart pointers from their contained type
https://hg.mozilla.org/mozilla-central/rev/2df2cb2dd088
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.