On Saturday, 22 January 2022 at 18:00:58 UTC, vit wrote:
I want implement something like this:
Scratch the previous reply, 'twas a brain fart... Simply take by value, no need for extra copies at all in that case. Arguments themselves will become those copies as needed.
```d import std.meta : allSatisfy; enum bool isRcPtr(T) = is(T == RcPtr!U, U); //@safe access to data of multiple ref counted objects: public auto apply(alias fn, Args...)(Args args) if (allSatisfy!(isRcPtr, Args)) { @property auto ref elm(alias param)()@trusted{ return param.get(); } return fn(staticMap!(elm, args)); } ```