On Thursday, April 28, 2016 at 9:35:56 AM UTC+10, Kyle Huey wrote:
> Can we catch this pattern with a compiler somehow?
> 
> Foo foo;
> foo.x = thing;
> DoBar(mozilla::Move(foo));
> if (foo.x) { /* do stuff */ }
> 
> - Kyle

Definitely something that would be nice.

But if we have/implement such a catcher, I'd like to have an annotation to say 
"yep I really want to reuse this moved-from object".
Because sometimes the function will choose not to actually move from an 
rvalue-ref, or the object knows to revert to a fully-reusable state, etc.

- Gerald
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to