Closed
Bug 1562333
Opened 5 years ago
Closed 5 years ago
`mozilla::Result` doesn't support move construction from an Ok value
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
DUPLICATE
of bug 1418624
People
(Reporter: jimb, Unassigned)
Details
Constructing Result<T, E>
from a T
value will never use a move constructor.
The constructor for ResultImplementation
forces T
to be passed by value:
https://searchfox.org/mozilla-central/rev/867cbb1a2b232398616e1aa42f913f37c6cb38e4/mfbt/Result.h#71
This makes Result
difficult to use for types that benefit from moves.
Comment 1•5 years ago
|
||
Worse is that Result can't handle move-only types (UniquePtr!) at all.
Comment 2•5 years ago
•
|
||
I think this was fixed by Bug 1418624.
You need to log in
before you can comment on or make changes to this bug.
Description
•