Template Declarations - Why not Template definitions?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 1 02:29:56 PDT 2015


On Tuesday, 30 June 2015 at 21:06:58 UTC, WhatMeWorry wrote:
> Bonus question: Isn't a Zero-parameter template declaration 
> pretty much worthless?

Functions in templates get certain attributes inferred 
automatically, like `@nogc`, `pure`, `nothrow`, `@safe`. Some 
people use them for that purpose. (Because of IFTI, functions 
with empty template parameters can be called with the same syntax 
as normal functions, they don't need the `!()`.)


More information about the Digitalmars-d-learn mailing list