Closed
Bug 1196966
Opened 9 years ago
Closed 9 years ago
Add explicit operator bool for mozilla::Variant
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: fitzgen, Assigned: fitzgen)
References
Details
Attachments
(1 file)
3.26 KB,
patch
|
Details | Diff | Splinter Review |
It turns out that it is useful to be able to convert to bool; who would have thought??
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8650726 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 2•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a9a0296a387d
Comment 3•9 years ago
|
||
I think we're going to go with WONTFIX here, in favor of matching more visibly and more explicitly. Conversion to bool, notwithstanding the |explicit| qualifier here, is not nearly as visible and clear as just matching the normal way. And it doesn't seem great to me to add an operator bool just because every embedded type supports it -- not when those types might support it with semantically different meanings (although this is probably less common than moderately-consistent types being unioned). Better to be clear about the exact meaning being tested, using the existing matching infrastructure.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•9 years ago
|
Attachment #8650726 -
Flags: review?(jwalden+bmo)
You need to log in
before you can comment on or make changes to this bug.
Description
•