varargs when they're not all the same type?

Andy Valencia dont at spam.me
Thu Mar 14 17:57:21 UTC 2024


Can somebody give me a starting point for understanding varadic 
functions?  I know that we can declare them

   int[] args...

and pick through whatever the caller provided.  But if the caller 
wants to pass two int's and a _string_?  That declaration won't 
permit it.

I've looked into the formatter, and also the varargs 
implementation.  But it's a bit of a trip through a funhouse full 
of mirrors.  Can somebody describe the basic language approach to 
non-uniform varargs, and then I can take it the rest of the way 
reading the library.

Thanks in advance!
Andy



More information about the Digitalmars-d-learn mailing list