templated static array

Namespace rswhite4 at googlemail.com
Mon Oct 15 07:05:24 PDT 2012


How can I do this?

I have this code: http://dpaste.dzfl.pl/d9165502

And as you can see, the templated function 'receive2' take 
automatically dynamic arrays. But how can I tell the compiler, 
that this function takes (preferably) static arrays?
My little "hack" function 'receive' take the type and the number 
of elements. So the compiler know: it's a static array. But is 
there no simpler trick to do this?
Maybe something like 'void receive(T)(static T vals) {'.


More information about the Digitalmars-d-learn mailing list