Parameter-less templates?
deadalnix
deadalnix at gmail.com
Mon Aug 12 18:07:59 PDT 2013
On Monday, 12 August 2013 at 19:03:41 UTC, monarch_dodra wrote:
> D has introduced a pretty cool tool: templates. These are
> basically namespaces that can be instantiated by a type/alias.
> Mixing with them the notion of "eponymous" allows to do some
> seriously cool things with them.
>
> One of the things I find strange though is that they *must* be
> parameterized.
Yes and no.
void foo()() {} is a parameter-less template.
As the construct already exists at semantic level, I guess making
it available everywhere is the way to go.
More information about the Digitalmars-d
mailing list