templated static array

Namespace rswhite4 at googlemail.com
Mon Oct 15 07:35:58 PDT 2012


So there is no way that the compiler knows by himself how many 
elements are in the array? something like this:

void receive(T, size_t n = vals.length)(T[n] vals) {
	writeln(typeof(vals).stringof);
}

or:

void receive(T)(T[vals.length] vals) {
	writeln(typeof(vals).stringof);
}




More information about the Digitalmars-d-learn mailing list