Replace (ie: substitute) a type in varadic args
Saurabh Das via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Aug 2 01:22:15 PDT 2016
On Tuesday, 2 August 2016 at 08:20:22 UTC, Saurabh Das wrote:
> On Tuesday, 2 August 2016 at 08:16:48 UTC, Sean Campbell wrote:
>> [...]
>
> Thanks. Yes that is one approach. I figured out another
> approach that seems decent:
>
> auto targetFunctionProxy(Args...)(Args args)
> {
> import std.meta;
> return targetFunction!(ReplaceAll!(bool, ubyte,
> Args))(args);
> }
PS: I'm unsure if this results in additional copying of arguments
in the case where there are no bools in the arguments.
More information about the Digitalmars-d-learn
mailing list