Specify the type but not number of function arguments in an interface?

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Jul 5 14:47:45 PDT 2009


On Sun, Jul 5, 2009 at 5:44 AM, downs<default_357-line at yahoo.de> wrote:
> 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...);
>

Read the rest of his post, downs.  Particularly option 2.


More information about the Digitalmars-d-learn mailing list