Check if a variadic argument is numeric?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 6 05:43:22 PDT 2017
On Thursday, 6 July 2017 at 12:26:11 UTC, Andrea Fontana wrote:
> I think you should provide a code snippet then. I think I
> missed something about your question.
You did - this question is about a runtime variadic which gives
you an array of TypeInfo objects, but all the answers are giving
compile time things. None of them will work since the static type
is some subclass of TypeInfo.
There is no method in the interface to do what the OP wants.
You'll have to do a list of comparisons.... or hack druntime, it
is fairly easy to add such a method... but that's not a realistic
solution either.
Best option would perhaps be switching to a compile time variadic
template.
More information about the Digitalmars-d-learn
mailing list