Re: Check if a variadic argument is numeric?

2017-07-06 Thread Hamborg via Digitalmars-d-learn
On Thursday, 6 July 2017 at 08:35:05 UTC, Andrea Fontana wrote: 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 dec

Re: Check if a variadic argument is numeric?

2017-07-06 Thread Hamborg via Digitalmars-d-learn
On Thursday, 6 July 2017 at 07:11:01 UTC, Ali Çehreli wrote: On 07/05/2017 11:26 PM, Hamborg wrote: I can test for exactly what what the args are with (_arguments[i] == typeid(int)) but if I just want to know if it's numeric and can pull it out as a double what should I do? I don't really want

Check if a variadic argument is numeric?

2017-07-05 Thread Hamborg via Digitalmars-d-learn
I can test for exactly what what the args are with (_arguments[i] == typeid(int)) but if I just want to know if it's numeric and can pull it out as a double what should I do? I don't really want to test for int, uint, byte, float, etc individually.