Closed
Bug 1469155
Opened 6 years ago
Closed 5 years ago
|Range::operator bool()| is non-functional because RangedPtr's can't be compared against nullptr
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla68
People
(Reporter: anba, Assigned: violet.bugreport)
Details
Attachments
(1 file)
|Range::operator bool()| compares the RangedPtr member against |nullptr| [1], but RangedPtr doesn't have an applicable |operator==()| overload for comparisons against null pointers, so when |Range::operator bool()| is actually called and gets compiled, a compiler error is emitted. [1] https://searchfox.org/mozilla-central/rev/6eea08365e7386a2b81c044e7cc8a3daa51d8754/mfbt/Range.h#67 [2] https://searchfox.org/mozilla-central/rev/6eea08365e7386a2b81c044e7cc8a3daa51d8754/mfbt/RangedPtr.h#235-256
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → violet.bugreport
Assignee | ||
Comment 1•5 years ago
|
||
Templated pointer can't match |nullptr|, we should add overloading for
std::nullptr_t specifically to be able to support |nullptr|.
Pushed by violet.bugreport@gmail.com: https://hg.mozilla.org/integration/autoland/rev/704809991618 Add overloading for std::nullptr_t for RangedPtr equality operator r=froydnj
Comment 3•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Updated•5 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•