Template Trick

matovitch camille.brugel at laposte.net
Wed Jun 12 14:26:40 PDT 2013


Hello,

I got a simple vector template :

struct Vector(T, uint N)
{
       alias type T;
       T data[N];
}

And I'd like to call a function like :

void func(V, V.type default_value)(args...);

But this (of course) doesn't work. Is there a simple and nice way
to do this ? (I'm sure there is ;-))

Thanks.


More information about the Digitalmars-d-learn mailing list