Re: Initialise non-copyable, non-default-constrauctable member struct

2018-07-27 Thread Peter Particle via Digitalmars-d-learn
On Friday, 27 July 2018 at 13:06:10 UTC, aliak wrote: On Friday, 27 July 2018 at 13:05:07 UTC, aliak wrote: https://run.dlang.io/is/lLrUiq Sorry: https://run.dlang.io/is/20FUoj Thanks, you are right, but it seems that I have reduced my issue too much, as it still does not work with my actua

Re: Initialise non-copyable, non-default-constrauctable member struct

2018-07-27 Thread aliak via Digitalmars-d-learn
On Friday, 27 July 2018 at 13:05:07 UTC, aliak wrote: https://run.dlang.io/is/lLrUiq Sorry: https://run.dlang.io/is/20FUoj

Re: Initialise non-copyable, non-default-constrauctable member struct

2018-07-27 Thread aliak via Digitalmars-d-learn
On Friday, 27 July 2018 at 12:11:37 UTC, Peter Particle wrote: Question is related to this: https://dlang.org/spec/struct.html#disable_default_construction struct S { int x; @disable this(); // Disables default construction @disable this(this); // Disable copying this(int v)

Initialise non-copyable, non-default-constrauctable member struct

2018-07-27 Thread Peter Particle via Digitalmars-d-learn
Question is related to this: https://dlang.org/spec/struct.html#disable_default_construction struct S { int x; @disable this(); // Disables default construction @disable this(this); // Disable copying this(int v) { x = v; } } struct T { float y; S s; @disable thi