Parameterized Structs

bearophile bearophileHUGS at lycos.com
Thu Mar 3 03:25:36 PST 2011


Ali Çehreli:

> <quote>
> Template value parameter types can be any type which can be statically 
> initialized at compile time, and the value argument can be any 
> expression which can be evaluated at compile time. This includes 
> integers, floating point types, and strings.
> </quote>

I have needed arrays as template specialization arguments few times (I have used alias to solve the problem). Allowing strings but not arrays is one limitation that I don't understand.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list