calling function templates

bearophile bearophileHUGS at lycos.com
Sun Aug 9 05:56:35 PDT 2009


Jos van Uden:

> I noticed that I don't always have to use the bang notation for
> function templates.

Generally function templates in D are able to infer their types by themselves, so generally you don't add the types with the !().


>I played around with that a little, but got an error when I used a static array.<

It may be a problems of ranges. D fixed-size arrays have some limitations/bugs, like you can't return them (but you can return one of them if you wrap it into a struct, weird).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list