[Proposal] "Name inference" for function templates

Derek Parnell derek at psych.ward
Thu Jun 15 20:35:55 PDT 2006


On Fri, 16 Jun 2006 04:35:57 +0200, Markus Dangl wrote:

> http://www.digitalmars.com/d/template.html
> If there's only a single declaration, you can even write:
> 
> T sqr(T) ( T x )
> {
>      return x*x;
> }
> 

> This is the same for class templates.

Neat! But it is not documented. 

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
16/06/2006 1:34:48 PM



More information about the Digitalmars-d mailing list