Specify the type but not number of function arguments in an interface?
downs
default_357-line at yahoo.de
Sun Jul 5 02:44:06 PDT 2009
Doctor J wrote:
> I want to write an interface that expresses the following idea: "classes implementing this interface must have a void function named update, with a fixed but indeterminate number of parameters of the same (template parameter) type."
Use a typesafe variadic function, i.e.
void test(int[] integers...);
More information about the Digitalmars-d-learn
mailing list