On Wed, Nov 15, 2017 at 8:44 PM, Nathan Froyd <[email protected]> wrote:
> * initialized lambda captures
>
I would like to use initialized lambda capture as I think it will allow
move-only objects to be used in lambdas like this:
UniquePtr<Thing> uniqueThing = MakeUnique<Thing>();
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([uniqueThing =
Move(uniqueThing)] () {
uniqueThing->Stuff();
});
thread->Dispatch(r.forget());
Thanks.
Ben
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform