Re: Template bug with second mixin?

2014-12-05 Thread Andre via Digitalmars-d-learn
I think I mimized the coding too much. What I actually want to achieve is to generate read methods in the structure for different data types (Ubyte, short, int): I thought the eponymous trick would insert the content of the enum instead the name itself? string getReadMethods(string methodName,

Re: Template bug with second mixin?

2014-12-05 Thread ketmar via Digitalmars-d-learn
On Fri, 05 Dec 2014 09:19:27 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I think I mimized the coding too much. What I actually want to achieve is to generate read methods in the structure for different data types (Ubyte, short, int): I thought the

Re: Template bug with second mixin?

2014-12-05 Thread Andre via Digitalmars-d-learn
thanks a lot. That makes sense. Kind regards André On Friday, 5 December 2014 at 09:29:21 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 05 Dec 2014 09:19:27 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I think I mimized the coding too much. What I

Template bug with second mixin?

2014-12-04 Thread Andre via Digitalmars-d-learn
Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not defined template insertReadMethods(string MethodName, DataType) { enum insertReadMethods = ; } struct Data {

Re: Template bug with second mixin?

2014-12-04 Thread ketmar via Digitalmars-d-learn
On Fri, 05 Dec 2014 07:06:34 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not

Re: Template bug with second mixin?

2014-12-04 Thread ketmar via Digitalmars-d-learn
On Fri, 05 Dec 2014 07:06:34 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not