An idea to improve eponymous templates

Mehrdad wfunction at hotmail.com
Thu Apr 12 10:25:14 PDT 2012


+1 for This

"bearophile"  wrote in message news:bcqvpvgjswwdgsfxsars at forum.dlang.org...

Reid Levenick:

> So, my idea is that the 'this' keyword could be used in templates as a 
> shortcut for eponymous templates, allowing code like this
>
> template anEponymousTemplate( size_t whatever ) {
>   enum this = whatever * 2;
> }

Other "This" (with upper case)?

Bye,
bearophile 



More information about the Digitalmars-d mailing list