Closed
Bug 1280175
Opened 9 years ago
Closed 9 years ago
Allow passing lvalue to MediaEventProducerExc<T>::Notify
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla50
| Tracking | Status | |
|---|---|---|
| firefox50 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
Details
Attachments
(1 file)
Consider the following code:
int i = 3;
MediaEventProducerExc<int> source;
source.Notify(i);
A compile error will be emitted:
error: cannot bind ‘int’ lvalue to ‘int&&’
We should allow both rvalue and lvalue so the client can invoke copy or move constructor as it sees fit.
| Assignee | ||
Comment 1•9 years ago
|
||
Btw, it is also awkward to say:
|source.Notify(Move(i))| in order to compile as far as |i| is just an int.
| Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/59280/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/59280/
Attachment #8762807 -
Flags: review?(gsquelart)
Comment on attachment 8762807 [details]
Bug 1280175 - Allow passing lvalue to MediaEventProducerExc<T>::Notify.
https://reviewboard.mozilla.org/r/59280/#review56292
Attachment #8762807 -
Flags: review?(gsquelart) → review+
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/66799d393492
Allow passing lvalue to MediaEventProducerExc<T>::Notify. r=gerald
Comment 6•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•