How to define templates
Steve Teale
steve.teale at britseyeview.com
Sun Mar 29 10:46:56 PDT 2009
The documentation says:
TemplateDeclaration:
template TemplateIdentifier ( TemplateParameterList ) Constraint(opt)
{ DeclDefs }
DeclDefs as defined where?
What should be the effect of the following?
import std.stdio;
template gnomeSaying(T, U, V, string s)
{
writefln(s ~ " motherfucker");
}
void main()
{
writefln(gnomeSaying!(int, double, int, "Yo"));
}
More information about the Digitalmars-d
mailing list