Template mixins - why only declarations

Dejan Lekic dejan.lekic at gmail.com
Thu Mar 6 10:36:11 PST 2014


Template mixins can't contain statements, only declarations, because they 
(template mixins) are a way to inject code into the context.

Therefore it makes sense to forbid statements, as they can't appear in ANY 
context.

-- 
http://dejan.lekic.org


More information about the Digitalmars-d-learn mailing list