Closed Bug 1280175 Opened 9 years ago Closed 9 years ago

Allow passing lvalue to MediaEventProducerExc<T>::Notify

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

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.
Btw, it is also awkward to say: |source.Notify(Move(i))| in order to compile as far as |i| is just an int.
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+
Thanks for the review!
Assignee: nobody → jwwang
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/66799d393492 Allow passing lvalue to MediaEventProducerExc<T>::Notify. r=gerald
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: