How to define templates
Walter Bright
newshound1 at digitalmars.com
Sun Mar 29 12:24:27 PDT 2009
Steve Teale wrote:
> Also, would it be reasonable for the compiler to issue a warning or
> error message to the effect that T, U, and V were never mentioned in
> the template body.
No, because the template signature may be conforming to an externally
applied interface, and may simply not need the args.
> What is the basic difference between Templates and Macros - the
> declarations thing is obviously crucial, but why?
Macros manipulate text, templates manipulate syntax trees. They happen
at very different stages in compilation.
More information about the Digitalmars-d
mailing list