Re: struct constructor co nfusion

2015-11-06 Thread anonymous via Digitalmars-d-learn
On 06.11.2015 20:05, Spacen Jasset wrote: Also, I had to add a dummy private constructor to make my structs 'createable', or is there another way? e.g. struct Texture { @disable this(); static Texture create() { return Texture(0); } ... private: this(int) {

Re: struct constructor co nfusion

2015-11-06 Thread Spacen Jasset via Digitalmars-d-learn
On Friday, 6 November 2015 at 17:50:17 UTC, Atila Neves wrote: On Friday, 6 November 2015 at 17:34:29 UTC, Spacen Jasset wrote: Hello, I have read various things about struct constructors, specifically 0 argument constructors, and using opCall and @disable this(); which no longer seems to

struct constructor co nfusion

2015-11-06 Thread Spacen Jasset via Digitalmars-d-learn
Hello, I have read various things about struct constructors, specifically 0 argument constructors, and using opCall and @disable this(); which no longer seems to work. What I am after I think is the behavior of C++'s structs on the stack, namely for some or all of these uses at a given

Re: struct constructor co nfusion

2015-11-06 Thread Atila Neves via Digitalmars-d-learn
On Friday, 6 November 2015 at 17:34:29 UTC, Spacen Jasset wrote: Hello, I have read various things about struct constructors, specifically 0 argument constructors, and using opCall and @disable this(); which no longer seems to work. What I am after I think is the behavior of C++'s structs