aliasing functions with function arguments as well ??
james.p.leblanc
james.p.leblanc at gmail.com
Fri Aug 13 16:05:21 UTC 2021
On Friday, 13 August 2021 at 15:14:00 UTC, Steven Schveighoffer
wrote:
> There isn't a way to alias it. You can wrap it though, and hope
> the inliner takes care of the difference:
>
> ```d
> auto foo(T)(T arg)
> {
> static if(is(T == int)) return bar(arg, 42.33);
> else return bar(7, arg);
> }
> ```
>
> -Steve
Steve,
Thanks! Yes ... this templated wrapper should be perfect for me!
Your help on my present question, as well as your continual
contributions to the forum are greatly appreciated!
Best Regards,
James
More information about the Digitalmars-d-learn
mailing list