Re: Overzealous recursive template expansion protection?

2010-11-03 Thread Gareth Charnock
On 03/11/10 03:21, Robert Jacques wrote: struct BinaryOp(L,string op,R) { pragma(msg,"Instansiating " ~ typeof(this).stringof); BinaryOp!(typeof(this),s,R1) opBinary(string s,R1)(R1 r) { pragma(msg,"Instansiating BinaryOp.opBinary ~L.stringof ~ op ~ R1.stringof); retu

Re: Overzealous recursive template expansion protection?

2010-11-02 Thread Robert Jacques
On Tue, 02 Nov 2010 22:03:47 -0400, Gareth Charnock wrote: I've been trying to correctly implement the interpreter patten/expression templates in D (for reference this is a summary of the C++ interpreter patten can be found here http://www.drdobbs.com/184401627). I've run into a problem an

Overzealous recursive template expansion protection?

2010-11-02 Thread Gareth Charnock
I've been trying to correctly implement the interpreter patten/expression templates in D (for reference this is a summary of the C++ interpreter patten can be found here http://www.drdobbs.com/184401627). I've run into a problem and I'm not sure if it's a compiler bug or not. The testcase is: