Help with specific template function

rumbu rumbu at rumbu.ro
Mon Mar 26 06:48:45 UTC 2018


On Monday, 26 March 2018 at 06:40:34 UTC, Vladimirs Nordholm 
wrote:

>
> However I do not understand how to use that with my arguments. 
> Eg. I would expect to do something like:
>
>     void foo(X, Y, Args...)(X x, Y y, Args args)
>     if(isNumeric!(x) && isNumeric!(y) && args.length >= 1)
>     {
>         // ...
>     }
>
> gives the error
>
>     template instance isNumeric!(x) does not match template 
> declaration isNumeric(T)
>
> How would I resolve this issue?


isNumeric applies to a type, not to a variable => IsNumeric!X


More information about the Digitalmars-d-learn mailing list