Open
Bug 1128930
Opened 9 years ago
Updated 2 years ago
mozilla::Array does not allow aggregate initializers
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
REOPENED
People
(Reporter: emk, Unassigned)
Details
Attachments
(1 file)
564 bytes,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Because mArr is private.
Attachment #8558495 -
Flags: review?(jwalden+bmo)
Comment 1•9 years ago
|
||
Comment on attachment 8558495 [details] [diff] [review] patch Review of attachment 8558495 [details] [diff] [review]: ----------------------------------------------------------------- ::: mfbt/Array.h @@ +24,1 @@ > T mArr[Length]; Interesting, I didn't know this was a requirement to use aggregates. :-( I guess specs deal with this must-be-public requirement by using a reserved name. We can't do that ourselves because, well, we're not implementing the language. So let's at least rename this a bit to make clearer that this is Not To Be Touched. Could you rename this to |mPrivateArrFieldDoNotUse|? Or something that makes clear people must not use this directly.
Attachment #8558495 -
Flags: review?(jwalden+bmo) → review+
Reporter | ||
Comment 2•9 years ago
|
||
I found our portability guide did not allow to use initializer lists with objects :( https://developer.mozilla.org/en-US/docs/Mozilla/C++_Portability_Guide#Don%27t_use_initializer_lists_with_objects It would be better to enforce the restriction until the guide is reconsidered. Luckily, mozilla::BinarySearchIf worked with plain arrays.
Comment 3•9 years ago
|
||
I'm pretty sure our style guide is Just Wrong there, because it's unbearably ancient on the point. Certainly HP-UX we don't care about that much -- it better be using supported gcc and such, and I doubt there's a portability concern for such gcc on HP-UX.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•