Variadic function parameters passed by move

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 21 15:11:02 PST 2016


On Wednesday, 21 December 2016 at 21:09:41 UTC, Jonathan M Davis 
wrote:
> Given that ref isn't involved, assuming that nothing else after 
> the call to g references ranges, the compiler should move the 
> values in ranges when it calls g, so I would have hoped that 
> the compiler would then allow you to call g with some of the 
> values being non-copyable, but maybe it's not that forgiving 
> right now for some reason. I can't actually test anything at 
> the moment though, so I don't know what it will and won't 
> actually allow you to do - just what it should be able to allow 
> you to do given what it does with implicit moves.

My plan:

https://github.com/dlang/phobos/pull/4971


More information about the Digitalmars-d-learn mailing list