Check if a variadic argument is numeric?
Andrea Fontana via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 6 01:35:05 PDT 2017
On Thursday, 6 July 2017 at 08:22:44 UTC, Hamborg wrote:
> But how would I check _arguments[i]?
>
> When I do (isNumeric!_arguments[i]) I get an error saying:
> "Error: template instance isNumeric!(_arguments) does not match
> template declaration isNumeric(T)"
>
> or when I do (isNumeric!(_arguments[i])) I get this error:
> "Error: variable _arguments cannot be read at compile time"
Try with:
isNumeric!(typeof(_arguments[i]));
Andrea
More information about the Digitalmars-d-learn
mailing list