On Wednesday, July 01, 2015 09:29:56 via Digitalmars-d-learn wrote:
> 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, l
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
I was reading "D Templates: A Tutorial" by Philippe Sigaud which
says:
--- quote
What is a Template? In the next chapters, you’ll see how to
define function, struct and class templates.
But before that, I’d like to introduce what a template really is,
because this
def
On Tuesday, 30 June 2015 at 21:06:58 UTC, WhatMeWorry wrote:
All the stuff I've read about templates always refers to them
as template declarations.
So with the following code segment:
template codeBlockTemplate(T, U)
{
T a = 7;
U b = 'z';
}
codeBlockTemplate!(int, char); // error he
All the stuff I've read about templates always refers to them as
template declarations.
So with the following code segment:
template codeBlockTemplate(T, U)
{
T a = 7;
U b = 'z';
}
codeBlockTemplate!(int, char); // error here
Microsof's Visual Studio IDE tells me expected, ;
found