www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: A tutorial on D templates

On Fri, Jan 13, 2012, at 11:28 PM, Peter Alexander wrote:
 On 13/01/12 10:48 PM, DNewbie wrote:
 I can't understand it. Why would someone need template programming. What
problem does template solve?

Suppose you want to write a function to get the minimum of two integers. It's easy:

Oh.. I see. Thank you everybody.
Jan 13 2012