On Sunday, 31 January 2016 at 17:55:53 UTC, Matt Elkins wrote:
Errr, ignore the makeFoo() line. Left that in by accident, has no bearing on the issue.
Ok, I think I understand why this doesn't work, at least. The Foo passed into bar() is, of course, an lvalue itself.
So I can achieve this with a new bar(), like so: [code] void bar(Foo foo) { import std.algorithm.mutation; Foo foo1 = move(foo); } [/code]