Closed
Bug 1054115
Opened 10 years ago
Closed 6 years ago
Make Maybe<T> support functors and argument perfect forwarding for map()
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: seth, Assigned: mozbugz)
References
Details
Attachments
(1 file)
It was necessary to rip out support for functors and argument perfect forwarding for Maybe<T>::map() at the last minute, because the decltype() technique I was using to make them work fails on GCC 4.4. (The error is "sorry, unimplemented: mangling template_id_expr".)
We still want these things. In this bug we hopefully figure out a way to get them on GCC 4.4. In the worst case, we can use the implementations that worked everywhere but GCC 4.4 when we finally drop that compiler; look at bug 913586 comment 53 and the next couple of comments for the old patches.
Assignee | ||
Comment 1•8 years ago
|
||
2.5 years later... We now require gcc 4.8 (soon 4.9), so it should be ok to re-add some useful functions that couldn't make it in bug 913586.
Seth, any interest and bandwidth for this? If not, I'd be happy to take over; please let me know, thanks!
Depends on: 1077549
Flags: needinfo?(seth.bugzilla)
Comment 3•8 years ago
|
||
I'm 99% sure that Seth would be fine with you taking this bug.
Updated•6 years ago
|
Assignee: seth.bugzilla → nobody
Updated•6 years ago
|
Flags: needinfo?(seth.bugzilla)
Assignee | ||
Comment 4•6 years ago
|
||
And 1.7 years later (sorry), we're now using gcc 6.1 and C++14, so it's easier to write more efficient Maybe::map and apply.
Assignee: nobody → gsquelart
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•6 years ago
|
||
No need to specify the return type in C++14, this save some less-readable
decltype&declval work.
And we make sure to std::forward the function object before invoking it, to
preserve its const and l/rvalue qualifiers.
Assignee | ||
Comment 6•6 years ago
|
||
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99d33ba5e213
Maybe::map and apply now take the function through a forwarding reference - r=froydnj
Comment 8•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 9•6 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•