Closed
Bug 1669421
Opened 5 years ago
Closed 5 years ago
mozilla::Result::andThen does not accept a function that accepts an rvalue reference
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
83 Branch
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
Details
Attachments
(1 file)
Code like
Result<int, const char*> r1(10);
Result<int, const char*> r2 =
r1.andThen([](int&& x) { return Result<int, const char*>(x + 1); });
does not compile but fails with a substitution failure for the call to andThen
.
With C++17, we can now use std::invoke_result_t
rather than decltype
.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c5d47bafb1c3
Make andThen accept a function that accepts a rvalue reference. r=emilio
Comment 3•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox83:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•