On 04/28/12 22:02, Walter Bright wrote:
> On 4/28/2012 12:36 PM, Andrej Mitrovic wrote:
>> Also there's mixin templates. What exactly is the difference between
>> mixin templates and regular templates?
> 
> A mixin template is instantiated in context of the instantiation point, while 
> a regular template is instantiated in the context of the template definition 
> point.
> 
> This becomes relevant when looking up symbols that are not defined within the 
> template.

Yeah, but this was actually the only suggestion so far in this thread that
i could agree with... The issue is

   template t1() { int a = b; }
   int main() { int b; mixin t1; return a; }

which is currently accepted - and would enforcing the mixin annotation
really help anything?

artur

Reply via email to