An idea to improve eponymous templates

bearophile bearophileHUGS at lycos.com
Wed Apr 11 20:13:03 PDT 2012


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