-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1607634 - Part 1: Improve the ergonomics of using NotNull with Re…
…fPtr and nsCOMPtr, r=glandium This does a few minor improvements: 1. Adds implicit conversions from NotNull to a raw pointer type if supported by the underlying type, to make it so NotNull<RefPtr<T>> acts more like RefPtr<T> in some situations. 2. Adds explicit conversion constructors and assignment operators for RefPtr and nsCOMPtr from NotNull, avoiding conversion ambiguity added by the first change. 3. Disable conversion constructors on NotNull with SFINAE if they should not be available, meaning that type traits like std::is_convertible_v interact with it properly. Differential Revision: https://phabricator.services.mozilla.com/D168883
- Loading branch information
Showing
3 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters