On Friday 2013-07-19 12:15 +1200, Robert O'Callahan wrote: > On Fri, Jul 19, 2013 at 3:34 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com>wrote: > > > On 2013-07-18 5:48 AM, mscl...@googlemail.com wrote: > > > > r-value references 4.3@ 10.0! Yes > >> > > > > This is very useful. I believe the JS engine already rolls their own > > tricks to implement this semantics. > > > > With this we can get rid of already_AddRefed and just pass > nsRefPtr/nsCOMPtr/RefPtr around, right?
Is the idea here that nsRefPtr/nsCOMPtr/etc. would have move constructors, and we'd just return them, and the move constructors plus return value optimizations would take care of avoiding excess reference counting? Or does it involve something more complicated like returning rvalue references? (Is such a thing possible?) -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform