Infer function template parameters

Peter Alexander peter.alexander.au at gmail.com
Thu Sep 20 13:52:23 PDT 2012


On Thursday, 20 September 2012 at 19:56:48 UTC, Jonas Drewsen 
wrote:
> Wouldn't it make sense to allow the same for function templates 
> as well: <snip>
>
> What am I missing (except some code that needs chaging because 
> only param type and not name has been specified in t?

I can't see any implementation issues with it, but I think 
templates should be an explicit choice when writing functions.

Like it or not, templates still cause a lot of code bloat, 
complicate linking, cannot be virtual, increase compilation 
resources, and generate difficult to understand messages. They 
are a powerful tool, but need to be used wisely.




More information about the Digitalmars-d mailing list