Templated vec

bearophile bearophileHUGS at lycos.com
Sat Sep 25 08:07:48 PDT 2010


Simen kjaeraas:
> This is issue #3467 - Non-int integral template parameters not correctly  
> propagated
> The solution is to use int instead of size_t:

Thank you! :-)

I'll add a template constraint to be sure M it's positive:
void opBinary(string op:"~", int M)(Vec!M) if (M >= 0) {}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list