Template with template?

Philippe Sigaud philippe.sigaud at gmail.com
Thu Mar 20 12:55:20 PDT 2014


>
>
>>
> I thought the array T[] traits could hold any _type_ the template Trait is
> instantiated into.


Different instantiations of a template could become totally unrelated types
(heck, even things that are *not* types: function definitions, values, code
blocks, ...). So there is now way for an array could hold them all, in
general.

At their core, templates are just parameterized code blocks, that become
whatever strikes your fancy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140320/1923f819/attachment.html>


More information about the Digitalmars-d-learn mailing list