Unpack Variadic Args?

Adam D. Ruppe destructionator at gmail.com
Thu Feb 13 17:18:10 UTC 2020


On Thursday, 13 February 2020 at 17:13:31 UTC, Steven 
Schveighoffer wrote:
> the f(foo(args)...) syntax doesn't have a D equivalent.

It would be staticMap 
<http://dpldocs.info/experimental-docs/std.meta.staticMap.html>

f(staticMap!(foo, args))

staticMap is a recursive template 
<http://dpldocs.info/experimental-docs/source/std.meta.d.html#L785> so no mixin stuff

but it can get CT memory heavy in some cases due to all the 
instantiations. i say the compiler should just do this better. 
but really it works for the most part.


More information about the Digitalmars-d-learn mailing list