
In order to implicit cast an lvalue to an rvalue when returning from a function, the return type and type of variable in the return statement previously had to be exactly the same. When this was not the case, std::move was required. For instance, when returning a std::unique_ptr<Derived> variable in a function with a std::unique_ptr<Base> return type, std::move is required. DR 1579 changed this, and allows for implicitly converting to the return type, if the return type has a constructor(T&&), where T is the type of the local variable being returned. DR 1579 was implemented in GCC 5, but not in GCC 4.9 and below. By explicitly qualifying the local variable with std::move, we allow for compiling with GCC 4.9 and incur no performance penalty. The code is still absolutely correct to the word of C++11. BUG=chromium:682965 See also: * https://bugs.gentoo.org/show_bug.cgi?id=600288 * https://stackoverflow.com/questions/22018115/converting-stdunique-ptrderived-to-stdunique-ptrbase#comment33375875_22018521 * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3833.html#1579 Review-Url: https://codereview.webrtc.org/2642053003 Cr-Commit-Position: refs/heads/master@{#16175}
61 lines
2.0 KiB
Plaintext
61 lines
2.0 KiB
Plaintext
# Names should be added to this file like so:
|
|
# Name or Organization <email address>
|
|
|
|
Adam Fedor <adam.fedor@gmail.com>
|
|
Alexander Brauckmann <a.brauckmann@gmail.com>
|
|
Andrew MacDonald <andrew@webrtc.org>
|
|
Anil Kumar <an1kumar@gmail.com>
|
|
Ben Strong <bstrong@gmail.com>
|
|
Bob Withers <bwit@pobox.com>
|
|
Bridger Maxwell <bridgeyman@gmail.com>
|
|
Christophe Dumez <ch.dumez@samsung.com>
|
|
Cody Barnes <conceptgenesis@gmail.com>
|
|
Colin Plumb
|
|
Eric Rescorla, RTFM Inc. <ekr@rtfm.com>
|
|
Giji Gangadharan <giji.g@samsung.com>
|
|
Graham Yoakum <gyoakum@skobalt.com>
|
|
Hugues Ekra <hekra01@gmail.com>
|
|
Jake Hilton <jakehilton@gmail.com>
|
|
James H. Brown <jbrown@burgoyne.com>
|
|
Jiawei Ou <jiawei.ou@gmail.com>
|
|
Jie Mao <maojie0924@gmail.com>
|
|
Luke Weber <luke.weber@gmail.com>
|
|
Manish Jethani <manish.jethani@gmail.com>
|
|
Martin Storsjo <martin@martin.st>
|
|
Matthias Liebig <matthias.gcode@gmail.com>
|
|
Maxim Potapov <vopatop.skam@gmail.com>
|
|
Mike Gilbert <floppymaster@gmail.com>
|
|
Pali Rohar
|
|
Paul Kapustin <pkapustin@gmail.com>
|
|
Philipp Hancke <philipp.hancke@googlemail.com>
|
|
Rafael Lopez Diez <rafalopezdiez@gmail.com>
|
|
Ralph Giles <giles@ghostscript.com>
|
|
Riku Voipio <riku.voipio@linaro.org>
|
|
Robert Nagy <robert.nagy@gmail.com>
|
|
Ryan Yoakum <ryoakum@skobalt.com>
|
|
Satender Saroha <ssaroha@yahoo.com>
|
|
Sarah Thompson <sarah@telergy.com>
|
|
Saul Kravitz <Saul.Kravitz@celera.com>
|
|
Silviu Caragea <silviu.cpp@gmail.com>
|
|
Steve Reid <sreid@sea-to-sky.net>
|
|
Vladimir Beloborodov <VladimirTechMan@gmail.com>
|
|
Vicken Simonian <vsimon@gmail.com>
|
|
Victor Costan <costan@gmail.com>
|
|
|
|
&yet LLC <*@andyet.com>
|
|
Agora IO <*@agora.io>
|
|
ARM Holdings <*@arm.com>
|
|
BroadSoft Inc. <*@broadsoft.com>
|
|
Google Inc. <*@google.com>
|
|
Intel Corporation <*@intel.com>
|
|
MIPS Technologies <*@mips.com>
|
|
Mozilla Foundation <*@mozilla.com>
|
|
Opera Software ASA <*@opera.com>
|
|
Sinch AB <*@sinch.com>
|
|
struktur AG <*@struktur.de>
|
|
Telenor Digital AS <*@telenor.com>
|
|
Temasys Communications <*@temasys.io>
|
|
The Chromium Authors <*@chromium.org>
|
|
The WebRTC Authors <*@webrtc.org>
|
|
Vonage Holdings Corp. <*@vonage.com>
|