Closed
Bug 987253
Opened 10 years ago
Closed 10 years ago
Add MFBT_EXPLICIT_CONVERSION_OPERATOR
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
Attachments
(1 file)
3.55 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
I need this for something specific, which I'll file and make depend on this.
Attachment #8395793 -
Flags: review?(jwalden+bmo)
Comment 1•10 years ago
|
||
Comment on attachment 8395793 [details] [diff] [review] MOZ_EXPLICIT_CONVERSION_OPERATOR Review of attachment 8395793 [details] [diff] [review]: ----------------------------------------------------------------- ::: mfbt/Attributes.h @@ +133,5 @@ > + * MOZ_EXPLICIT_CONVERSION_OPERATOR is a specifier on a type conversion > + * overloaded operator that expands to 'explicit' if C++11 explicit conversion > + * operators are supported, i.e. disallowing implicit conversions using this > + * conversion operator. If C++11 explicit conversion operators are not supported > + * then this expands to nothing. Needs an example by it: * template<typename T> * class Ptr * { * T* ptr; * MOZ_EXPLICIT_CONVERSION_OPERATOR operator bool() { return ptr != nullptr; } * }; Also change the "expands to" language to discuss the *effect* of its expansions, and not what those expansions are. Not to bikeshed names too hard, but maybe MOZ_EXPLICIT_CONVERSION only? Users are going to spell out the operator part of this themselves.
Attachment #8395793 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 2•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1defae2eeae9
Assignee: nobody → bjacob
Comment 3•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1defae2eeae9
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•